.wxss
@font-face {
font-family: 'iconfont'; /* project id 2448503 */
src: url('//at.alicdn.com/t/font_2448503_v1tw2vdebvs.eot');
src: url('//at.alicdn.com/t/font_2448503_v1tw2vdebvs.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_2448503_v1tw2vdebvs.woff2') format('woff2'),
url('//at.alicdn.com/t/font_2448503_v1tw2vdebvs.woff') format('woff'),
url('//at.alicdn.com/t/font_2448503_v1tw2vdebvs.ttf') format('truetype'),
url('//at.alicdn.com/t/font_2448503_v1tw2vdebvs.svg#iconfont') format('svg');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 30rpx;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-dizhi:before {
content: "\e61d";
}
.icon-jiahao:before {
content: "\e721";
}
.icon-xiaoxi:before {
content: "\e66c";
}
.icon-zhuye:before {
content: "\e605";
}
.icon-wode:before {
content: "\e699";
}
wxml:
<view><icon id="iconfont"></icon></view>
<view><icon class="iconfont"></icon></view>
在运行的时候只显示&#e61d;为什么不显示对应的图标
我最近也发现了,矢量图标下载下来的css文件放到wxss中就不能用了,不知道题主解决了这个问题没有