本篇文章给大家带来的内容是关于 icon字体在vue中的使用方法,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。
因为项目是vue搭建的 用unicode 字符不方便,就只能设定class。
一开始以为是版本问题,但是也没有结果。找了下样式里面的字体路径也是没问题的。
最后尝试着加了一段css,发现就没问题了。这个是layui.css里面没有的,不知道layui的大佬们要不要考虑加进去。
[class^="layui-icon-"], [class*="layui-icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: layui-icon !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-text-stroke-width: 0.2px;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}代码贴上了。碰到同样问题的朋友可以尝试下
相关推荐:
关于shortcut icon和icon代码的区别介绍_HTML/Xhtml_网页制作
立即学习“前端免费学习笔记(深入)”;










