Outlook中的文本不使用行高

Niq*_*qql 6 css outlook html-email

我正在创建一个带有Html的电子邮件,我偶然发现了Outlook 2010的一个问题.这是我的代码:

<td background="images/11-text-1--alpha-d3c29e.jpg" 
bgcolor="#d3c29e" width="514" height="460"  valign="top">        
    <!--[if gte mso 9]>
    <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" 
    style="width:514px;height:460px;">
    <v:fill type="tile" src="images/11-text-1--alpha-d3c29e.jpg" color="d3c29e" />
    <v:textbox inset="0,0,0,0">
    <![endif]-->
        <p style="margin:0;padding:0;font-family:'Courier New',Courier,monospace;
        font-size:14px;font-weight:bold;color:#000000;line-height:15px;">
            #TEXT
        </p>
    <!--[if gte mso 9]>     </v:textbox>   </v:rect>   <![endif]-->
</td>
Run Code Online (Sandbox Code Playgroud)

现在我想从文本中更改行高,但是当我在我的p标签中更改它时,它不会这样做,但是如果我把它放在td和/或MSO exeption中它也不会这样做对于Outlook.有没有办法让这项工作,或者有人知道Outlook的解决方法吗?

Gor*_*ton 9

您需要使用mso样式"mso-line-height-rule".这用于强制Outlook遵守行高规则.请注意,这需要在声明的行高之前添加,否则将无效.见下文:

<td background="images/11-text-1--alpha-d3c29e.jpg" 
bgcolor="#d3c29e" width="514" height="460"  valign="top" style="margin:0;padding:0;font-family:'Courier New',Courier,monospace; font-size:14px;font-weight:bold;color:#000000;mso-line-height-rule:exactly; line-height:15px;">        
    <!--[if gte mso 9]>
    <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" 
    style="width:514px;height:460px;">
    <v:fill type="tile" src="images/11-text-1--alpha-d3c29e.jpg" color="d3c29e" />
    <v:textbox inset="0,0,0,0">
    <![endif]-->   
            #TEXT
    <!--[if gte mso 9]>     </v:textbox>   </v:rect>   <![endif]-->
</td>
Run Code Online (Sandbox Code Playgroud)