Outlook中的文本不使用行高 [英] Text in Outlook doesn't use line-height

查看:164
本文介绍了Outlook中的文本不使用行高的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用HTML创建电子邮件,偶然发现了Outlook 2010的问题.这是我的代码:

I'm creating a Email with Html and I stumbled upon an issue with Outlook 2010. Here is my code:

<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>

现在我想更改文本的行高,但是当我在p标签中更改行高时,它不会这样做,但是如果我将其放在td和/或MSO组件中,也不会为Outlook做花招.有什么方法可以使这项工作奏效,或者有人知道Outlook的解决方法吗?

now I want to change the line-height from the text, but when I change it in my p tag, it wont do it, but also if I put it in the td and/or the MSO exeption it wouldn't do the trick for Outlook. Is there any way to make this work, or does anyone know a workaround for Outlook?

推荐答案

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

You need to use the mso style "mso-line-height-rule". This is used to force Outlook to respect the line height rule. Please note this needs to be added PRIOR to the declared line-height or it will not work. See below:

<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>

这篇关于Outlook中的文本不使用行高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆