今天我在使用outlook发送邮件到Gmail时,遇到了一个新问题。问题是超链接元素显示为下划线。我尝试了以下方法:
方法1:
我尝试使用这个简单的标签:
<td width="500px" align="center" style=" text-align: left; font-size:1.2em; font-family:Candara; color: #FFFFFF;">
<a href="mailto:info@example.com" style="color:#fff;text-decoration:none;" target="_blank">info@xxx.com</a>
</td>
方法2:
<a href="mailto:info@example.com" style="color:#fff;text-decoration:none !important;" target="_blank">info@ccc.com</a>
方法三:
a {text-decoration: none !important; color: #000; cursor: text;}
这段代码在浏览器和Outlook中正常工作,问题出现在Gmail邮箱上。因为Gmail会动态添加span标签到超链接标签之后。
这里附上一个视频参考:
给定:text-decoration none由于在span标签内添加了a标签后而无法被Gmail邮箱接受。
完整代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mailtest</title>
</head>
<body style="margin:0; padding:0;">
<table width="582" border="0" cellspacing="0" cellpadding="0" align="center" style="background:black;">
<tr>
<td width="500px" align="center" style=" text-align: left; font-size:1.2em; font-family:Candara; color: #FFFFFF;">
<img style="margin-left:10px;" src="http://codestrz.com/Content/mail/envelope.png" alt="" border="0" height="18" width="18"/>
<a href="mailto:info@example.com" style="color:#fff;text-decoration:none" target="_blank">info@xxx.com</a>
</td>
</tr>
</table>
</body>
</html>
我尝试使用这个简单的标签:
<p style="color:white;"> EXTRANET.EXAMPLE.COM</p>
尝试了一下不带链接的简单p标签,
[![enter code here][1]][1]
<span>
标签后的代码是什么样子吗? - Daniel_ZA