如何text-decoration: underline
在Internet Explorer中删除CSS伪元素?
+
在其他浏览器(例如Google Chrome)中,该图标没有下划线,但是在Internet Explorer中,该图标带有+
下划线。如何删除Internet Explorer的下划线?
代码(https://jsfiddle.net/u5m067xq/4/):
h3 a {
text-decoration:underline;
}
h3 a:before {
display:inline-block;
content: '+';
margin:0;
padding: 4px;
text-decoration:none;
}
<h3><a href="#">link</a></h3>
该代码可以按预期工作。a
标签的默认样式为text-decoration: underline
。您将必须进行设置none
。
span {
text-decoration: underline;
}
h3 a:before {
display: inline-block;
content: '+';
margin: 0;
padding: 4px;
text-decoration: none;
}
a {
text-decoration: none;
}
<h3><a href="#"><span>link</span></a></h3>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句