解决uniapp App端iconfont图标显示异常问题
原来的iconfont.css:@font-face {font-family: "iconfont"; /* Project id 2762712 */src: url('iconfont.woff2?t=1631523743638') format('woff2'),url('iconfont.woff?t=1631523743638') format('woff'),url('iconfon
·
原来的iconfont.css:
@font-face {
font-family: "iconfont"; /* Project id 2762712 */
src: url('iconfont.woff2?t=1631523743638') format('woff2'),
url('iconfont.woff?t=1631523743638') format('woff'),
url('iconfont.ttf?t=1631523743638') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
......
url改用绝对路径,App端就可以正常显示iconfont图标了。修复后的iconfont.css:
@font-face {
font-family: "iconfont"; /* Project id 2762712 */
src: url('~@/static/iconfont/iconfont.woff2?t=1631523743638') format('woff2'),
url('~@/static/iconfont/iconfont.woff?t=1631523743638') format('woff'),
url('~@/static/iconfont/iconfont.ttf?t=1631523743638') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
......
更多推荐
已为社区贡献10条内容
所有评论(0)