3vi*_*3vi 5 html css icon-fonts
我用 fontello 制作了我的字体图标集。目前它的工作原理如下:
<div class="icons_class home" ng-click="toHome()"></div>
Run Code Online (Sandbox Code Playgroud)
对应类的CSS为:
.icons_class {
font-family: 'myFont';
...
...
}
.home:before {
content: '/e822';
}
Run Code Online (Sandbox Code Playgroud)
但我想这样使用:
<div class="icons_class" ng-click="toHome()">home</div>
就像材质图标一样。
是否可以?为此我必须使用连字吗?
我做到了。
我必须使用 icomoon.io,而不是 fontello.com,其中有一个特定的连字功能:
连字
要启用/禁用连字,请按应用程序字体选项卡中的 fi 按钮。通过启用连字,您将能够为每个字形分配单词/标签。(使用逗号将多个单词分配给每个字形。)
如果您使用字体的平台支持连字,则键入您分配给每个字形的单词将显示该字形。IE 9 及更早版本不支持连字,但 IcoMoon 应用程序为您提供了 JavaScript 填充。IE 10 和其他现代浏览器支持连字。