字体awesome类与多个不同的图标 [英] Font-awesome class with multiple different icons

查看:198
本文介绍了字体awesome类与多个不同的图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建自定义字体类型,其中包含多个图标,即
.2star类由一行中的2颗星和3颗空星组成,彼此相邻。有没有办法在CSS或者我必须使用html-only解决方案与多个i类吗?

I want to create custom font-awesome class with multiple icons in it, i.e. .2star class consisting of 2 stars and 3 empty stars in a line, beside each other. Is there a way to do it in CSS or I have to use html-only solution with multiple i-classes ?

推荐答案

您创建了一个自定义字体awesome类,在此类内容中包含多个字符

Yes you create a custom font awesome class, with multiple characters in content like this

.class:after {
   content: "\f005\f005\f005"; /* 3 Stars */
    font-family: FontAwesome;
}

演示

请注意, \f005 等可以在FontAwesome样式表中找到,因此复制您喜欢的字体类型的unicode,并使用它的内容属性与Font Awesome字体系列。

Note that the values like \f005 etc can be found in FontAwesome stylesheet so copy the unicode of the type of font you like and use it in the content property with the font family of Font Awesome.

这篇关于字体awesome类与多个不同的图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆