例如:
@font-face {font-family: "iconfont";
src:url('../fonts/iconfont.ttf') format('truetype'); /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
}
.iconfont {
font-family:"iconfont" !important;
font-size:16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
}
.icon-nanzhuang:before { content: "\e600"; }
.icon-nvzhuang:before { content: "\e601"; }
.icon-gouwuche:before { content: "\e602"; }
请问要怎么改字体颜色呢?谢谢
2 个回复
Trust - 少说废话
用css修改元素的color即可
Salazar
直接用color属性就可以改了,我在项目里面也用到很多字体图标
pirate (作者)
谢谢
2017-08-25 14:00