用阿里巴巴的iconfont,引用之后底下始终有一条虚线是怎么回事?右边这个都是正常的。
这是我引用的代码
@font-face {
font-family: 'iconShare';
src: url('../../font/share/iconfont.eot');
src: url('../../font/share/iconfont.eot?#iefix') format('embedded-opentype'), url('../../font/share/iconfont.woff2') format('woff2'), url('../../font/share/iconfont.woff') format('woff'), url('../../font/share/iconfont.ttf') format('truetype'), url('../../font/share/iconfont.svg#iconfont') format('svg');
}
.iconShare {
font-family: "iconShare" !important;
font-size: 18px;
font-weight: bold;
color: #398cd9;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@font-face {
font-family: 'iconfont back';
src: url('../../font/back/iconfont.eot');
src: url('../../font/back/iconfont.eot?#iefix') format('embedded-opentype'), url('../../font/back/iconfont.woff2') format('woff2'), url('../../font/back/iconfont.woff') format('woff'), url('../../font/back/iconfont.ttf') format('truetype'), url('../../font/back/iconfont.svg#iconfont') format('svg');
}
.iconBack {
font-family: "iconfont back" !important;
font-size: 18px;
font-weight: bold;
color: #398cd9;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none;
}
因为你用的 a 标签
对对,我是把span放在a里面,这样不行吗?
卧槽,牛逼!换了个div好了,不好意思,不是职业搞前端的,能不能解释下为啥用a标签里面会有这种情况?
@codezera: 浏览器默认就会在 a 标签下加上下划线,你可以用 text-decoration: unset 去掉