【问题标题】:Conditional comment for outlook desktop version not workingOutlook 桌面版的条件注释不起作用
【发布时间】:2016-09-10 07:49:20
【问题描述】:

我在使用 Outlook 桌面版的条件 cmets 时经常遇到问题。在 Outlook 2013 中查看电子邮件时,它仍然显示为带有边框和与非 mso 客户端相同的字体大小。

我也将条件 cmets 放在了 head 标签中,但它也不起作用。

如果你们中的任何人能在代码中的某处发现拼写错误或错误?

这就是我正在使用的全部代码:

<html xmlns="http://www.w3.org/1999/xhtml">
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
    <title>Outlook conditional comments</title>

    <meta charset="ISO-8859-1">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="keywords" content="">

</head>

    <body>
    <!--[if gte mso 9]>
    <table class="lookout" border="0" cellpadding="0" cellspacing="0" align="left" style="max-width: 600px; 
    width: 100%; height: auto; font-size:3em;"> <tbody> <tr> <td>Increasing sales </td> </tr> </tbody> </table>
    <![endif]-->
        <table class="lookout" border="1" cellpadding="0" cellspacing="0" align="center" style="max-width: 600px; width: 100%; height: auto; font-size:1em;">
            <tbody>
                <tr>
                    <td>Increasing Sales</td>
                </tr>
            </tbody>
        </table>
</body>
</html>

非常感谢提前 丹妮

【问题讨论】:

    标签: outlook html-email email-client


    【解决方案1】:

    显示边框是因为第二个&lt;table&gt; 没有从 Outlook 中隐藏。 Outlook 2007/10/13/16 同时显示&lt;table&gt;s。

    我们要编写两个表,并将每个表包装在一个 &lt;mso&gt; 标记中:一个 显示 &lt;table&gt; 仅适用于 Outlook 2007/10/13/16,另一个 隐藏 &lt;table&gt; 仅适用于 Outlook 2007/10/13/16。像这样:

    <body>
        <!--[if gte mso 9]>
        <table class="lookout" border="0" cellpadding="0" cellspacing="0" align="left" style="max-width: 600px; 
        width: 100%; height: auto; font-size:3em;">
            <tbody>
                <tr>
                    <td>Increasing sales In Outlook 2007/10/13/16</td>
                </tr>
            </tbody>
        </table>
        <![endif]-->
    
        <!--[if !mso 9]><!-->
        <table class="lookout" border="1" cellpadding="0" cellspacing="0" align="center" style="max-width: 600px; width: 100%; height: auto; font-size:1em;">
            <tbody>
                <tr>
                    <td>Increasing Sales everywhere else</td>
                </tr>
            </tbody>
        </table>
        <!--<![endif]-->
    

    【讨论】:

      【解决方案2】:

      它以边框和字体大小显示,因为底部表格没有隐藏。此外,我大多数时候都使用这个术语:&lt;!--[if (gte mso 9)|(IE)]&gt; 它似乎对大多数 MSO 客户来说效果最好

      【讨论】:

        【解决方案3】:

        @Niklas 和@Ted:非常感谢您的回复。

        我再次尝试并按照您建议 Ted 的方式发送电子邮件,但不幸的是,边框和 1em 字体大小在 Outlook 2013 中再次出现。 我想知道发送它的电子邮件客户端是否会影响它在稍后查看的电子邮件客户端中的显示方式。我是从 gmail 发送的。我从浏览器中保存了 html 文档并将其复制到 gmail。

        这是我复制的 html 文件的样子:

        <html xmlns="http://www.w3.org/1999/xhtml">
        <html>
        
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
            <title>Outlook conditional comments</title>
        
            <meta charset="ISO-8859-1">
            <meta name="description" content="">
            <meta name="author" content="">
            <meta name="keywords" content="">
        
        </head>
        
            <body>
            <!--[if gte mso 9]>
            <table class="lookout" border="0" cellpadding="0" cellspacing="0" align="left" style="max-width: 600px;
            width: 100%; height: auto; font-size:3em;"> <tbody> <tr> <td>Increasing sales 13</td> </tr> </tbody> </table>
            <![endif]-->
        
            <!--[if !mso 9]>      <!-->
                <table class="lookout" border="1" cellpadding="0" cellspacing="0" align="center" style="max-width: 600px; width: 100%; height: auto; font-size:1em;">
                    <tbody>
                        <tr>
                            <td>Increasing Sales everwhere else</td>
                        </tr>
                    </tbody>
                </table>
             <!--<![endif]-->
        </body>
        </html>

        非常感谢对新代码的任何想法或评论。

        丹妮

        【讨论】:

          猜你喜欢
          • 2014-10-08
          • 2014-04-02
          • 2012-05-07
          • 2012-01-25
          • 2017-01-21
          • 1970-01-01
          • 2013-01-22
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多