')format('truetype'),/* chrome, firefox, opera, Safari, Android, iOS 4.2+*/url('iconfont.svg?t=1528182562648#iconfont')format('svg');/* iOS 4.1- */}.iconfont{font-family:"iconfont"!important;font-size:16px;font-style:normal;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale; }.icon-gouwuche:before{content:"\e600";}.icon-weibiaoti1:before{content:"\e621";}.icon-zhongzhijiaoyimima:before{content:"\e626";}
第四步:修改@font-face
将以上代码拷贝,替换, 如下:
/**app.wxss**/.container{height:100%;display: flex;flex-direction: column;align-items: center;justify-content: space-between;box-sizing: border-box;font-size:28rpx;color:#333; }/* 引入iconfont */@font-face{font-family:'iconfont';/* project id 675140 */src:url('//at.alicdn.com/t/font_675140_d33rycuy1wfxn7b9.eot');src:url('//at.alicdn.com/t/font_675140_d33rycuy1wfxn7b9.eot?#iefix')format('embedded-opentype'),url('//at.alicdn.com/t/font_675140_d33rycuy1wfxn7b9.woff')format('woff'),url('//at.alicdn.com/t/font_675140_d33rycuy1wfxn7b9.ttf')format('truetype'),url('//at.alicdn.com/t/font_675140_d33rycuy1wfxn7b9.svg#iconfont')format('svg'); }.iconfont{font-family:"iconfont"!important;font-size:16px;font-style:normal;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale; }.icon-gouwuche:before{content:"\e600";}.icon-weibiaoti1:before{content:"\e621";}.icon-zhongzhijiaoyimima:before{content:"\e626";}
第五步:使用iconfont