pirate
pirate
  • 发布:2017-08-25 08:53
  • 更新:2017-08-25 11:20
  • 阅读:6884

字体图标改颜色

分类:MUI

例如:

          @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"; }

请问要怎么改字体颜色呢?谢谢

2017-08-25 08:53 负责人:无 分享
已邀请:
Trust

Trust - 少说废话

用css修改元素的color即可

Salazar

Salazar

直接用color属性就可以改了,我在项目里面也用到很多字体图标

.mui-icon-gear-filled:before {  
    content: '\e532';  
    color: #045380;  
}  

.mui-icon-extra-order:before {  
    content: "\e113";  
    color: #5A8C19;  
}  

.mui-icon-extra-university:before {  
    content: "\e605";  
    color: #E51C23;  
}  

.mui-icon-extra-peoples:before {  
    content: "\e205";  
    color: #1590E9;  
}
  • pirate (作者)

    谢谢

    2017-08-25 14:00

该问题目前已经被锁定, 无法添加新回复