【发布时间】:2021-11-12 12:01:32
【问题描述】:
我想知道是否可以使用与上面按钮相同的填充来制作边框。解决方案似乎是当我将边框添加到 td 时,但我不能这样做,因为在其他客户端中,边框具有此处不可见的边框半径。有任何想法吗?谢谢
第二个按钮的代码:
<!-- BUTTON -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" class="fluid"
role="presentation" width="600">
<tr>
<td align="center" bgcolor="#ffffff" style="padding: 0 0 40px 0;"
valign="top">
<table align="center" border="0" cellpadding="0" cellspacing="0"
class="main-button-mob-width" role="presentation"
style="max-width: 80%; min-width: auto;">
<tr>
<td align="center" bgcolor="#ffffff"
class="out-main-button-padding"
style="border-radius: 50px; padding: 0; font-family:
'Arial Black', Gadget, Arial,
Helvetica, sans-serif; font-size: 18px; font-weight: bold;
line-height: 22px; mso-text-raise: 4px;"
valign="top">
<a class="out-main-button-a"
href="#" style="display: block;
border-radius: 50px; background-color: #ffffff;
border: 3px solid #061539;
mso-border-alt: 8px solid #061539;
padding: 15px 35px 15px 35px; mso-padding-alt: 4px;
color: #061539; text-decoration: none;"
target="_blank" title="">
<span style="color: #061539; text-decoration: none;
background-color: #ffffff">INVITA A TUS AMIGOS
</span>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- BUTTON end -->
【问题讨论】:
-
您的标题是关于填充的,但您的问题是关于边界的。差异很明显,但很难理解问题所在。
a上有border-radius: 50px;。如果您删除它,它们会更相似。 -
好吧,我注意到没有填充,所以边框看起来不一样。很明显,因为“a”是内联元素,但border-raius 在其他任何地方都不起作用。边界必须在那里,边界半径也必须在那里。唯一的问题是,在前景中,边框半径不可见,但在其他客户端中却是..我只需要按钮的宽度/高度与周围的边框相同..
标签: html email button html-email