【发布时间】:2019-11-22 13:00:07
【问题描述】:
我正在制作一个电子邮件活动,下面是 2 个按钮。我正在使用 Litmus 来测试它们,它们在每个平台上看起来都很好,除了 Windows 中的 Outlook。宽度只取内部文本的宽度,不取给定的宽度,即 336px。难道我做错了什么?
<table border="0" cellpadding="0" cellspacing="0" style="font-family: Avenir-Medium, Helvetica, sans-serif; box-sizing: border-box;">
<tr>
<td style="font-family: Avenir-Medium, Helvetica, sans-serif; box-sizing: border-box;">
<a href="Foo" class="button button-green" target="_blank" style="display: block; box-sizing: border-box; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16); color: #000000; background-color: #ffffff; border-top: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; width: 336px; height: 51px; border-radius: 4px; font-family: Avenir-Medium, Helvetica, sans-serif; text-decoration: none; -webkit-text-size-adjust: none; font-size: 20px; font-weight: 600; font-style: normal; font-stretch: normal; line-height: 49px; letter-spacing: normal; text-align: center; color: #000000;">Fooo</a>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width: 336px; font-family: Avenir-Medium, Helvetica, sans-serif; box-sizing: border-box;">
<tr style="width:336px">
<td style="width: 336px; font-family: Avenir-Medium, Helvetica, sans-serif; box-sizing: border-box;">
<a href="foo" class="button button-green" target="_blank" style="display: block; box-sizing: border-box; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16); color: #ffffff; background-color: #f04b93; border-top: 10px solid #f04b93; border-right: 18px solid #f04b93; border-bottom: 10px solid #f04b93; border-left: 18px solid #f04b93; width: 336px; height: 51px; border-radius: 4px; font-family: Avenir-Medium, Helvetica, sans-serif; text-decoration: none; -webkit-text-size-adjust: none; font-size: 20px; font-weight: 600; font-style: normal; font-stretch: normal; line-height: 31px; letter-spacing: normal; text-align: center; color: #ffffff;">Foo</a>
</td>
</tr>
</table>
【问题讨论】:
标签: html css html-table html-email