2016-09-20 70 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,如果你喜歡的另一種方法。