为什么字体大小 CSS 不适用于 iPad HTML 电子邮件?

发布于 2024-09-13 03:35:04 字数 159 浏览 3 评论 0原文

我正在处理 HTML 电子邮件,并且仅在 iPad 上的邮件客户端上遇到问题。

尽管字体大小在 Mac OS X 的邮件应用程序中正确显示,但将内联 CSS 设置为“font-size: 12px”或任何其他大小似乎在 iPad 的邮件应用程序上不起作用。

有什么想法吗?

I'm working on an HTML email and have been running to a problem on the mail client on the iPad only.

It seems that setting inline CSS to "font-size: 12px" or any other size does not work on the mail app for iPad, despite the font-size displaying correctly in the Mail app for Mac OS X.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

小霸王臭丫头 2024-09-20 03:35:04

Webkit 会自动调整 ipad 上的字体大小以方便阅读。这个 CSS 解决了这个问题:

-webkit-text-size-adjust: none;

Webkit automatically adjusts font-sizes on the ipad for easy reading. This CSS fixes the problem:

-webkit-text-size-adjust: none;
捂风挽笑 2024-09-20 03:35:04

WebKit 布局引擎会自动调整字体大小。

截至本文,Webkit 通常用于 Safari、Chrome、Kindle 和 Palm 浏览器.

应用程序还可以利用 WebKit。

问题归结为 最小 'font-size: 13px;'

CSS 解决方法:
<代码>


一个问题是创建电子邮件签名时,标签可能会被覆盖或删除。
请注意,内联 WebKit 样式将从 Gmail 的 Web 客户端中删除。

The WebKit layout engine automatically adjusts font-sizes.

As of this post, Webkit is commonly used in Safari, Chrome, Kindle and Palm Browsers.

Applications can also take advantage of WebKit.

The problem comes down to minimum 'font-size: 13px;'

A CSS work-around:

<style type="text/css">
div, p, a, li, td { -webkit-text-size-adjust:none; }
</style>


One issue is when creating e-Mail Signatures, for tags may be over-written or stripped.
Please Note that inline WebKit Styling will be stripped out of Gmail's Web Client.

抚你发端 2024-09-20 03:35:04

支持编写样式文本吗? (即粗体、斜体、字体大小)
否(已确认),除了从 Safari 或其他应用程序复制粘贴所带来的任何格式之外。 (它绝对支持显示 HTML/富文本消息。)

http://www.macintouch。 com/reviews/ipad/faq.html

Does it support composing styled text? (i.e., bold, italics, font sizes)
No (confirmed), aside from any formatting carried over by copy-and-paste from Safari or other apps. (It definitely supports displaying HTML/rich text messages.)

http://www.macintouch.com/reviews/ipad/faq.html

当爱已成负担 2024-09-20 03:35:04
<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>
<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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文