html - Outlook 中的 HTML 电子邮件失真

标签 html css outlook

我有一个可与其他电子邮件客户端一起使用的电子邮件模板,但 Outlook 将其显示为扭曲的(内部 div)。在这里,我指定了内部 div 的宽度 920px,但在 outlook 中没有生效。我要么试过this solution但不起作用

这是我的 html 电子邮件模板

<html>
   <body>
      <div style="width:950;margin:0px auto;">
         <img style="width:100%;" src="cid:header">
         <div style="background-color: #f3f3f3;width: 920px;padding: 15px 15px 20px 15px;margin: 0px;font-family: arial,sans-serif;font-size: 12.8px;box-sizing: border-box;color:#000;white-space:pre-line;" >
             Dear xyz
             <br><br>
             My mail body 
             <!-- Body might contain table  -->
             <br><br>
             support<br>
         </div>
         <a href='https://example.com'><img style="width:100%;" src="cid:footer"></a>
      </div>
   </body>
</html>

我有引用previous question emailology但没有找到 div 的解决方案。

请帮帮我。

最佳答案

您不应使用标准的电子邮件前端开发解决方案。不幸的是,使用基于表格的布局仍然是处理它的最佳方式。此外,根据一般经验,电子邮件宽度最大应介于 600-800 像素之间。

关于html - Outlook 中的 HTML 电子邮件失真,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45036708/

相关文章:

c# - 通过 MS Outlook 发送电子邮件并禁用警告

javascript - angularJs检查是否输入了输入

javascript - 背景图像样式在 HTML header 中不起作用

html - 在除 Firefox 之外的所有浏览器中都出现跳动滚动

html - 表格单元格 - 宽度 : 100% with table-layout: fixed;

javascript - 在纯 Javascript 中将 <div> 修复到视口(viewport)中间 w/'position: absolute'

css - 如何改变CSS中按钮的背景颜色?

html - 如何使输入高度变小? ionic 2

c# - 如何模拟 ReflectionTypeLoadException?

HTML 电子邮件格式困惑