如何在IE中删除CSS中的锚点伪元素的下划线

时间:2016-03-22 08:06:28

标签: css internet-explorer pseudo-element

如何在Internet Explorer中删除CSS伪元素的text-decoration: underline

+图标在其他浏览器(如Google Chrome)中没有下划线,但在Internet Explorer中,+图标带有下划线。如何删除Internet Explorer的下划线?

代码(Android download manager complete):



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>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:1)

此代码按预期工作。 a代码的默认样式为text-decoration: underline。您必须将其设置为none

&#13;
&#13;
span {
  text-decoration: underline;
}
h3 a:before {
  display: inline-block;
  content: '+';
  margin: 0;
  padding: 4px;
  text-decoration: none;
}
a {
  text-decoration: none;
}
&#13;
<h3><a href="#"><span>link</span></a></h3>
&#13;
&#13;
&#13;