为什么字体大小CSS不工作果HTML电子邮件?
-
25-09-2019 - |
题
我工作上的HTML电子邮件和已经运行的一个问题在邮件上的客户上只。
看来,设置联CSS的"字体大小:12px"或任何其他大小不工作的邮件应用程序,尽管字体大小正确显示在邮件的应用程序for Mac OS X.
任何想法?
解决方案
的Webkit自动在ipad上,为方便阅读调整字体大小。此CSS修复该问题:
-webkit-text-size-adjust: none;
其他提示
其布局引擎自动调整字体大小。
作为这个后, 其通常使用野生动物园,铬,点燃和棕榈浏览器。
应用程序还可以利用的.
该问题涉及到 最小的字体尺寸:13px;'
CSS工作周围:
<style type="text/css">
div, p, a, li, td { -webkit-text-size-adjust:none; }
</style>
一个问题是在创建电子邮件签字,对于标记可能是过书面或剥离。
请注意,联。型将剥离出失败的网客户。
它支持编写样式文本? (即,粗体,斜体,字体大小)强> 没有从(确认),除任何格式的结转从Safari或其他应用程序复制和粘贴。 (这肯定支持显示HTML /富文本消息。)
<head>
<style type="text/css">
<!--
/*
I began with the goal to prevent font scaling in Landscape orientation.
To do this, see: http://stackoverflow.com/questions/2710764/
Later, I just wanted to magnify font-size for the iPad, leaving
the iPhone rendering to the css code. So ...
(max-device-width:480px) = iphone.css
(min-device-width:481px) and
(max-device-width:1024px) and
(orientation:portrait) = ipad-portrait.css
(min-device-width:481px) and
(max-device-width:1024px) and
(orientation:landscape) = ipad-landscape.css
(min-device-width:1025px) = ipad-landscape.css
*/
@media only screen and (min-device-width: 481px)
{
html {
-webkit-text-size-adjust: 140%;
}
}
-->
</style>
</head>
不隶属于 StackOverflow