how to use google material icons as class instead of <i> tag

…衆ロ難τιáo~ 提交于 2019-12-19 03:24:38

问题


According to the guideline in the Google Material website we have to use material icons in _i _ tag.

the question is how to add the icons as font-awesome. something like :

Class="material-icons face"

instead of

<i class="material-icons"> face </i>


回答1:


Yes,you can add the material icons as classes using the after pseudo elements.check out the fiddle

 <span class="material-icons face"></span>

.face {
    position:relative;
    display:inline-block;
}

.face:after {
    content: "face";
}


来源:https://stackoverflow.com/questions/37281861/how-to-use-google-material-icons-as-class-instead-of-i-tag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!