时间:2021-07-01 10:21:17 帮助过:7人阅读
因为项目是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_网页制作
关于网页收藏夹图标shortcut icon和icon代码的区别(转载)_html/css_WEB-ITnose
以上就是icon字体在vue中的使用方法的详细内容,更多请关注Gxl网其它相关文章!