使用el-button时如果图标使用的也是饿了么的图标,样式正常,如果使用el-button+阿里图标则会出现间距等问题
解决方案:
在iconfont.css页面写如下代码,可自由进行样式修改:
[class^="icon"],
[class*=" icon"]
{
font-family: "iconfont" !important;
font-size: 16px;
margin-right: 5px; /*图表与左侧文字或其他内容的间距*/
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
文件位置:
修改前:
修改后: