使用了却报错值没有使用
If you've not used glyph icon libraries like before, you're really missing out. They're incredibly useful, flexible, and are easy to implement via markup. The normal method for using font awesome is by using an <i> element with an icon-specific CSS class:
如果您以前从未使用过像这样的字形图标库,那您真的会错过了。 它们非常有用,灵活,并且易于通过标记实现。 使用超棒字体的常规方法是将<i>元素与图标特定CSS类一起使用:
This works beautifully in most cases but what if you don't want to inject an <i> tag or simply can't? If you run into this case, you can still use Font Awesome glyphs! All you need to do is use the :before pseudo-element of the element you want to use and set its content and font-family:
在大多数情况下,这种方法效果很好,但是如果您不想插入<i>标记或者根本无法插入该标记怎么办? 如果遇到这种情况,您仍然可以使用Font Awesome字形! 您所需要做的就是使用:before想要使用的元素的伪元素,并设置其内容和font-family:
div.github:before { content: "\f09b"; font-family: FontAwesome; /* more styling for the icon, including color, font-size, positioning, etc. */}
This is essentially what Font Awesome does for <i> tags so it's only natural that we do so for our custom purpose. To find the content string for the icon you'd like, just open the font-awesome.css and look up the icon you'd like to use!
从本质上讲,这就是Font Awesome对<i>标签所做的工作,因此出于自定义目的这样做是很自然的。 要找到所需图标的内容字符串,只需打开font-awesome.css并查找您想要使用的图标即可!
翻译自:
使用了却报错值没有使用