html使用常用字体图标
< h3 > < span aria-hidden = "true" data-icon = "abcdefg" ></ span > < span class="deleteIcon"> </span> Stats </ h3 > [data-icon]:before { font-family: icons; /* BYO icon font, mapped smartly */ content: attr(data-icon); speak: none; /* Not to be trusted, but hey. */ } .deleteIcon:before { font-family: icons; content: "d"; speak: none; } .gIcon:before { font-family: icons; content: "h"; speak: none; } 来源: oschina 链接: https://my.oschina.net/u/4038989/blog/4293988