简体   繁体   English

为什么 <p> 元素在Rackspace电子邮件中的显示方式不同?

[英]Why do <p> elements show up differently in Rackspace email?

Why do <p> elements show up differently in Rackspace email, versus other email clients such as Gmail, Outlook.com, Outlook (Desktop Application), and Mail (email client that comes with OS X)? 与其他电子邮件客户端(如Gmail,Outlook.com,Outlook(桌面应用程序)和Mail(OS X附带的电子邮件客户端))相比,为什么<p>元素在Rackspace电子邮件中的显示方式不同?

Here is what my <p> elements look like in Gmail, Outlook.com, Outlook, and Mail: 以下是我的<p>元素在Gmail,Outlook.com,Outlook和Mail中的外观: 在此输入图像描述

And here is what my <p> elements look like in Rackspace webmail: 这是我的<p>元素在Rackspace webmail中的样子: 在此输入图像描述

Here is what the code inside of my email looks like: 以下是我的电子邮件中的代码:

<p>TEST LINE BREAKS</p>
<p>TEST LINE BREAKS</p>
<p>TEST LINE BREAKS</p>
<p>TEST LINE BREAKS</p>

I tried using this application to normalize my email, but it still does not look the same on Rackspace: http://premailer.dialect.ca/ 我尝试使用此应用程序来规范化我的电子邮件,但在Rackspace上看起来仍然不一样: http//premailer.dialect.ca/

How could I get the line breaks to appear in the Rackspace email? 我怎样才能在Rackspace电子邮件中显示换行符?

Different email clients have different default styles for certain tags (like web browsers). 不同的电子邮件客户端对于某些标记(如Web浏览器)具有不同的默认样式 In this case, seems Gmail, Outlook.com, Outlook, and Mail give an unstyled <p> tag a small bottom margin, whereas Rackspace mail does not. 在这种情况下,似乎Gmail,Outlook.com,Outlook和Mail为无标记的<p>标记提供了一个小的底部边距,而Rackspace邮件则没有。

This can be reset by defining an explicit margin. 这可以通过定义显式边距来重置。 Using an inliner like premailer works just fine, though inlining by hand is more straight forward. 使用像预制器这样的内联工作效果很好,尽管手工内联更直接。

<p style="margin: 0 0 10px;">TEST LINE BREAKS</p>
<p style="margin: 0 0 10px;">TEST LINE BREAKS</p>
<p style="margin: 0 0 10px;">TEST LINE BREAKS</p>
<p style="margin: 0 0 10px;">TEST LINE BREAKS</p>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么计算字段不显示在表单中以发送电子邮件? - Why do calculated fields not show up in form to send email? 删除的克隆表单元素仍显示在电子邮件输出中 - Removed Cloned form elements still show up in email output 为什么我的图像不会显示在电子邮件签名中? - Why won't my image show up in email signature? Rackspace Cron Job电子邮件中的换行符 - newline in Rackspace Cron Job email 为什么注册时进行电子邮件验证很重要,是否“强制”? - Why is it important to do email verification upon sign up and is it “mandatory”? 为什么 AWS SES 发送的电子邮件不显示? - Why do AWS SES Sent Emails don't show up? 为什么在JSP中使用javaMail API时发信人的电子邮件不显示? - Why senders email does not show up while using javaMail API in JSP? 如何使用MVC smtp邮件正文使换行符显示在Web电子邮件中? - How do you get line breaks to show up in web email message using MVC smtp message body? 电子邮件图像未显示在ThunderBird中 - Email Images dont show up in ThunderBird HTML电子邮件-使用Outlook 2010打开邮件时,为什么某些元素不显示? - HTML email for – why do some elements not display when mail is opened with Outlook 2010?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM