首页 > IT职业 > IT生活 > ionic2 中使用iconfont
1.在 主目录node_modulesionic-angularfonts放入需要使用的iconfont字体文件
2.scss中申明字体文件(新建scss后别忘记引用 参考)
@font-face {font-family: "iconfont";
src: url('../fonts/iconfont.eot');
src: url('../fonts/iconfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/iconfont.woff') format('woff'),
url('../fonts/iconfont.ttf') format('truetype'),
url('../fonts/iconfont.svg') format('svg');
}
.iconfont {
font-family:"iconfont" !important;
font-size:16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
3.使用图标
作者:陈SunMoon
链接:https://www.jianshu.com/p/f3f9d195ecd8
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4827/viewspace-2806832/ ,如需转载,请注明出处,否则将追究法律责任。