2017-05-24 44 views
0

我正在構建一個電子郵件模板,並遇到了我想要在桌面上隱藏'td'的情況。我能夠使用媒體查詢和「顯示」來實現它:無」屬性幾乎所有的電子郵件客戶端Outlook除外2007/10/13/16使用MSO 9條件隱藏Outlook的移動內容

我的‘TD’看起來像這樣

     <td style="display:none;" class="show" > 
       <table border="0"cellpadding="0"cellspacing="0"width="100%"> 
        <tr> 
         <td style="usual styling"> 
          <font>some text</font> 
         </td>     
        </tr> 
        </table> 
        </td> 

和表演類是非常簡單:

​​3210

我在不同的論壇上閱讀,有使用MSO 9 if條件,你可以保持HTML從Outlook中隱藏的一部分,所以我想是這樣的:

<!--[if !mso 9]><\!--> 
<td style="display:none;" class="show" > 
    <table border="0"cellpadding="0"cellspacing="0"width="100%"> 
     <tr> 
      <td style="usual styling"> 
      <font>some text</font> 
      </td>     
     </tr> 
    </table> 
</td> 
<!-- <![endif]--> 

但Outlook 2007/10/13/16仍然顯示它和它裏面的內容。有人能幫我弄清楚如何實現這一目標嗎?

回答

0

試試這個:

<!--[if (gte mso 9)|(IE)]> 
<td style="display:none;" class="show" > 
    <table border="0"cellpadding="0"cellspacing="0"width="100%"> 
    <tr> 
     <td style="usual styling"> 
     <font>some texty</font> 
     </td>     
    </tr> 
    </table> 
</td> 
<![endif]--> 

這裏的一些其他信息,可以幫助您與Outlook。

Microsoft Outlook忽略@media查詢。

在你的代碼中你有一個叫做.show的類。如果要隱藏Outlook中的課程,請創建一個樣式表,將其放置在其他<style>表格的正下方<head>中。這應該讓它表現得很好。

<!--[if (gte mso 9)|(IE)]> 
    <style type="text/css"> 
    .show {display:none;} 
    </style> 
<![endif]--> 

祝你好運。