[英]How to Remove Hyperlink underline in Gmail while sending Email template from outlook
今天在從 Outlook 發送郵件到 Gmail 時遇到了一個新問題。問題是超鏈接元素顯示為下划線。 我在下面嘗試過。
方法一:
<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>
方法二:
<a href="mailto:info@example.com" style="color:#fff;text-decoration:none !important;" target="_blank">info@ccc.com</a>
方法3:
a {text-decoration: none !important; color: #000; cursor: text;}
此代碼在瀏覽器、outlook 中運行良好,問題出在 Gmail 郵箱中。因為 Gmail 在超鏈接標簽后動態添加了 span 標簽。
我在這里附上了視頻參考:
http://recordit.co/OGlkkBiXGX
給定: text-decoration none 它沒有被 gmail 框采用,因為在 span 標簽內的標簽被添加之后。
完整代碼
<!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]
插入;
在您的樣式中使用 text-decoration:none 之后,因為 html 在某些情況下無法讀取正確的 css 而不會結束。
試試這個
<a href='yourLink' bgcolor="#000000">yourLinkHere</a>
或者
<a href="yourLink" style="color:#CCCCCC; text-decoration:none;"><color="#CCCCCC">yourLink</font></a>
對於 2007 年以上的 Outlook 版本,
就是這樣,為您創建的所有新消息更改它
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.