为什么 Microsoft Outlook 在发送 HTML 电子邮件时不尊重列表样式?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7004367/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 09:59:14  来源:igfitidea点击:

Why doesn't Microsoft Outlook respect list styles when sending HTML emails?

htmlcssoutlook

提问by PeanutsMonkey

I have the following code and for the life of me I can't get it to work in Microsoft Outlook.

我有以下代码,我一生都无法在 Microsoft Outlook 中使用它。

<ul style="margin-left: 50px; line-height: 50px; list-style: none;">
    <li style="font-size: 1.5em; list-style: none;">[UniqueCode]</li>
</ul>

Is there another way to achieve the same result? I am attempting to send a HTML email to a group of people.

有没有另一种方法可以达到相同的结果?我正在尝试向一群人发送 HTML 电子邮件。

回答by marissajmc

Have a look at Campaign Monitor's guideto CSS support in HTML emails.

查看Campaign Monitor 的HTML 电子邮件中的 CSS 支持指南

list-style-image, list-style-positionand list-style-typeare not supported in Outlook 2007 or Outlook 2010.

list-style-imagelist-style-position并且list-style-type在 Outlook 2007 或 Outlook 2010 中不受支持。

Using table cells for layout is standard practice in HTML email builds because CSS support in Outlook is really bad.

使用表格单元格进行布局是 HTML 电子邮件构建中的标准做法,因为 Outlook 中的 CSS 支持非常糟糕。

Try using table cells with exact widths specified for the layout of your list, and have each item in a new row or separated by <br>s.

尝试使用为列表布局指定精确宽度的表格单元格,并将每个项目放在新行中或以<br>s.