2016-09-20 85 views
0

我有填充的锚链接:填充在前景不尊重按钮

<a href="http://my.cris.dev:3008/services/3/viewer" style="text-decoration:none; background-color:#137191; color:#fff; display:block; padding:16px 16px 16px; font:100 16px/16px &quot;Cabin&quot;,Arial, Helvetica, sans-serif; letter-spacing:0.025em; border-radius:4px;">Discover your 3D</a> 

但前景不尊重这种填充,它只是删除,什么是最好的解决办法,以免影响其他设计客户端。

回答

2

Outlook对盒子模型的支持很粗略。试试这个代码:

<table width="100%" border="0" cellspacing="0" cellpadding="0"> 
    <tr> 
     <td> 
      <table border="0" cellspacing="0" cellpadding="0"> 
       <tr> 
        <td bgcolor="#137191" style="padding: 16px; border-radius:4px"> 
         <a href="http://my.cris.dev:3008/services/3/viewer" target="_blank" style="font-size: 16px; mso-line-height-rule:exactly; line-height: 16px; font-family: 'Cabin',Arial, Helvetica, sans-serif; font-weight: 100; letter-spacing:0.025em; color: #ffffff; text-decoration: none; display: inline-block;">Discover your 3D</a> 
        </td> 
       </tr> 
      </table> 
     </td> 
    </tr> 
</table> 

这将解决您在Outlook中崩溃的填充问题。 Outlook仍然会显示平方角而不是border-radius,但至少您会看到一个可点击的填充按钮。

(我添加/编辑一些其他的属性,以帮助跨客户端显示)

a few way to achieve bulletproof buttons in email,如果你喜欢的另一种方法。