我尝试了所有建议的方法,我无法摆脱Gmail桌面上我的Outlook签名链接的蓝色下划线(在Gmail Android应用程序上很好)
我尝试将标题上的文本修饰应用于所有链接,href样式和span样式。我还尝试覆盖Gmail .ii
我分别尝试了每一个,但没有一个工作,无论我做什么,我总是得到一个蓝色下划线。
a:link {
text-decoration: none!important;
}
.ii a[href] {
text-decoration: none!important;
}
<a href="http://www.google.com" style="color:red; text-decoration:none">
<span style="color:red; text-decoration:none";>text</span>
</a>
你知道如何解决这个问题吗?
您的代码可以简化如下。有很多不必要/未使用的样式。但是,即使使用您的代码,下划线也不存在。还有一件事,尽量避免!重要,而是依靠css specificity
.info-link{
text-decoration:none;
color:red;
}
<body>
<a href="http://www.google.com" class="info-link"><span>text</span></a>
</body>
试试这个使用CSS text-decoration属性
<style type="text/css">
<!--
a { text-decoration : none; color : #000; }
-->
</style>
了解有关CSS text-decoration Property的更多信息
使用bootstrap库:
<link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
并在您的锚标记中添加class =“btn”:
<a class="btn" style="text-decoration: none;" href="http://www.google.com"><span>text</span></a>