img標簽使用src的方法展示圖片,如果使用background-image屬性就會多出邊框
0358B59F394F28E1CDD2A165F6E8AB0E.jpg
html
<img width="20" height="20" class="icon">
css
.icon
bg-image('setting') // 封裝的方法用于展示2x和3x圖
width 20px
height 20px
background-size 20px 20px
background-repeat no-repeat
margin-top 15px
margin-left 15px
解決方法:
1.img標簽 + 使用src的方式
2.span標簽 + 以下css代碼
display inline-block
bg-image('setting')
width 20px
height 20px
background-size 20px 20px
background-repeat no-repeat
margin-top 15px
margin-left 15px