我知道这是一个老问题,但我在寻找解决方案时(Outlook中可点击整个按钮),偶然发现了以下解决方案:
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center" valign="middle" >
<!-- start of Outlook compatible button generated by http://buttons.cm/ -->
<div><!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://yoururlhere.com/" style="height:52px;v-text-anchor:middle;width:330px;" arcsize="10%" stroke="f" fillcolor="#2fba45">
<w:anchorlock/>
<center>
<![endif]-->
<a href="http://yoururlhere.com/"
style="background-color:#2fba45;border-radius:5px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:13px;font-weight:bold;line-height:52px;text-align:center;text-decoration:none;width:330px;-webkit-text-size-adjust:none;">Yes please, send me a quote.</a>
<!--[if mso]>
</center>
</v:roundrect>
<![endif]--></div>
<!-- end of Outlook compatible button generated by http://buttons.cm/ -->
</td>
</tr>
</tbody>
</table>
请注意,我没有测试上面的代码。
其他答案确实链接到了campaignmonitor网站,但没有提供解决方案的这个链接。
campaignmonitor的博客文章提到,他们创建了一个特定的网站来生成与Outlook兼容的可点击按钮-http://buttons.cm,这是基于Stig M(@stigm在Twitter上)创建的解决方案。
我不为campaignmonitor工作。
希望能帮到某些人。
<html>
<title>
</title>
<head>
</head>
<body>
<table>
<thead>
<tr>
<td>Youtube</td>
<td id="assign_anchor_tag_here"></td>
</tr>
<thead>
</table>
<script>
var td_element = document.getElementById("assign_anchor_tag_here");
td_element.innerHTML = "<a href='https://www.youtube.com'>Click Here!</a>";
</script>
<table border="0" cellpadding="0" cellspacing="0" style="border-top-left-radius: 5px;border-top-right-radius: 5px;border-bottom-right-radius: 5px;border-bottom-left-radius: 5px;background-color: #2FBA45;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt; cursor:pointer;">
<tbody>
<tr>
<td align="center" valign="middle" style="font-family: Arial;font-size: 22px;padding: 15px;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;">
<a href="http://www.example.org" title="Yes please, send me a quote." target="_self" style="font-weight: bold;letter-spacing: -0.5px;line-height: 100%;text-align: center;text-decoration: none;color: #FFFFFF;word-wrap: break-word !important; display:block; width:100%; height:100%">Yes please, send me a quote.</a>
</td>
</tr>
</tbody>
</table>
onClick
,<td onClick="go to anchor">
。在内联样式中,你应该添加 cursor: pointer
,这样鼠标指针就会变成“悬停链接”指针。尝试移除 target="_self"
。由于 Outlook 是电子邮件客户端,它可能无法识别它,并导致问题。
顺带一提,如果您在电子邮件中使用锚链接(连接到同一页上的其他位置),这并不是所有电子邮件浏览器都完全支持的。这里有support chart。