Html 电子邮件 <hr/>造型问题 [英] Html emails <hr/> styling issue

查看:30
本文介绍了Html 电子邮件 <hr/>造型问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,电子邮件客户端将我的样式 <hr/> 恢复为只有实线的样式.

I have a problem with e-mail clients reverting my styled <hr/> to one with just a solid line.

以下是我的标记,在 Chrome 和 IE 中看起来不错,但 Outlook 总是将虚线恢复为实线.

The following is my mark-up, looks fine in Chrome and IE but Outlook always reverts the dotted line to a solid one.

<hr style="background:none; border:dotted 1px #999999; border-width:1px 0 0 0; height:0; width:100%; margin:0px 0px 0px 0px; padding-top:10px;padding-bottom:10px;" ></hr>

我看过 Campaign Monitor,但没有什么特别的东西可以指导我.

I have looked at Campaign Monitor but nothing particular to guide me there.

感谢所有答案.

推荐答案

我想这是因为 Outlook 使用的是 Microsoft Word 渲染引擎,而不是 HTML 引擎,并且 hr 标签会像在msword.

I would imagine it's because outlook uses the Microsoft word rendering engine, rather than a HTML engine, and a hr tag would just get reverted to a solid line as in msword.

我可能会尝试使用全宽表格->单元格或 div 和样式,而不是使用 hr 标签.

I'd probably try using a full width table->cell or div and style that instead of using an hr tag.

<table>
<tr>
<td style="background:none; border:dotted 1px #999999; border-width:1px 0 0 0; height:1px; width:100%; margin:0px 0px 0px 0px; padding-top:10px;padding-bottom:10px;">&nbsp;</td>
</tr>
</table>

nbsp 在那里,以防呈现引擎无法识别空单元格.

nbsp is in there in case the rendering engine doesn't recognise empty cells.

这篇关于Html 电子邮件 &lt;hr/&gt;造型问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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