Email 显示得很小,就像桌面版本一样,仅在 iOS 邮件中。

huangapple go评论74阅读模式
英文:

Email displaying small, like a desktop version, only in ios mail

问题

我无法弄清楚为什么我们的电子邮件在iOS邮件客户端中显示得像一个微型桌面版本。在iOS Outlook和Gmail中似乎正常。我们正在使用Salesforce Pardot。

这是我继承的样式:

<style type="text/css">
    /*一般样式*/
    body {font-family: Arial, sans-serif; font-weight: 400; text-align: center; padding: 0; margin: 0; border: 0;}
    p, ul, ol {margin: 0;}

    /*电子邮件样式*/
    .eyebrow {font-size: 12px; line-height: 16px; color: #425563;}
    .webversion {font-size: 12px; line-height: 16px; color: #425563;}
    .webversion > a {color: #425563 !important; text-decoration: none !important;}
    .webversion > a > span {color: #425563 !important; border-bottom: 1px solid #425563;}

    /*图像样式*/
    .picture, .picture-p {display: block !important;}
    .social_icon {width: 28px;}
    .cclogo {display: block; width: 200px;}
    .ccline {display: block; width: 300px;}

    /*标题样式*/
    .title-big {font-size: 28px; color: #0073FF; text-transform: uppercase;}
    .title-big > a {color: #0073FF; text-decoration: none !important;}
    .title-big > a > span {color: #0073FF;}
    .title-small {font-size: 18px; color: #425563;}
    .title-small > a {color: #425563; text-decoration: none !important;}
    .title-small > a > span {color: #425563; border-bottom: 1px solid #425563;}
    .title-big-r {font-size: 28px; color: #FFF; text-transform: uppercase;}
    .title-big-r > a {color: #FFFFFF; text-decoration: none !important;}
    .title-big-r > a > span {color: #FFFFFF;}
    .title-small-r {font-size: 18px; color: #FFFFFF;}
    .title-small-r > a {color: #FFFFFF; text-decoration: none !important;}
    .title-small-r > a > span {color: #FFFFFF; border-bottom: 1px solid #FFFFFF;}

    /*正文样式*/
    .text-regular, ul {font-size: 14px; line-height: 22px; text-align: left;}
    .text-regular > a {font-weight: 600; color: #425563; text-decoration: none !important;}
    .text-regular > a > span {font-weight: 600; color: #425563; border-bottom: 1px solid #425563;}
    .text-regular-r {font-size: 14px; line-height: 22px; color: #FFF; text-align: left;}
    .text-regular-r > a {font-weight: 600; color: #FFFFFF; text-decoration: none !important;}
    .text-regular-r > a > span {font-weight: 600; color: #FFFFFF; border-bottom: 1px solid #FFFFFF;}
    .text-small {font-size: 12px; line-height: 16px; color: #425563;}
    .text-small > a {color: #425563; text-decoration: none !important;}
    .text-small > a > span {font-weight: 600; color: #425563; border-bottom: 1px solid #425563;}
    .text-regular > img, .text-regular-r > img, .text-small > img {width: 12px;}

    /*响应式样式*/
    .mobile-only {display: none;}

    @media screen and (max-width: 768px) {
        .mobile-only {display: block !important;}
        .mobile-hide {display: none !important;}
        .rspnsv, .rspnsv > tr {display: block !important; width: 100% !important;}
        p {width: 95% !important; padding: 0 2.5% !important;}
        .picture {display: block !important; width: 100% !important; height: unset !important;}
        .picture-r {display: block !important; width: 95% !important; height: unset !important; padding: 0 2.5% !important;}
        .contact_icon, .button {padding-left: 2.5%;}
    }
</style>

我已经尝试了一些小屏幕的样式调整,以增加字体大小,但没有成功。为什么它只在iOS Mail中显示这样?

英文:

I can't figure out why our emails are displaying like a miniaturized desktop verison in ios mail clients. In ios Outlook and Gmail it seems fine. We are using Salesforce Pardot.

Email 显示得很小,就像桌面版本一样,仅在 iOS 邮件中。

Here's the styling I inherited

&lt;style type=&quot;text/css&quot;&gt;
/*GENERAL STYLES*/
body {font-family: Arial, sans-serif; font-weight: 400; text-align: center; padding: 0; margin: 0; border: 0;}
p, ul, ol {margin: 0;}
/*EMAIL STYLES*/
.eyebrow {font-size: 12px; line-height: 16px; color: #425563;}
.webversion {font-size: 12px; line-height: 16px; color: #425563;}
.webversion &gt; a {color: #425563 !important; text-decoration: none !important;}
.webversion &gt; a &gt; span {color: #425563 !important; border-bottom: 1px solid #425563;}
/*IMAGERY STYLES*/
.picture, .picture-p {display: block !important;}
.social_icon {width: 28px;}
.cclogo {display: block; width: 200px;}
.ccline {display: block; width: 300px;}
/* TITLE STYLES */
.title-big {font-size: 28px; color: #0073FF; text-transform: uppercase;}
.title-big &gt; a {color: #0073FF; text-decoration: none !important;}
.title-big &gt; a &gt; span {color: #0073FF;}
.title-small {font-size: 18px; color: #425563;}
.title-small &gt; a {color: #425563; text-decoration: none !important;}
.title-small &gt; a &gt; span {color: #425563; border-bottom: 1px solid #425563;}
.title-big-r {font-size: 28px; color: #FFF; text-transform: uppercase;}
.title-big-r &gt; a {color: #FFFFFF; text-decoration: none !important;}
.title-big-r &gt; a &gt; span {color: #FFFFFF;}
.title-small-r {font-size: 18px; color: #FFFFFF;}
.title-small-r &gt; a {color: #FFFFFF; text-decoration: none !important;}
.title-small-r &gt; a &gt; span {color: #FFFFFF; border-bottom: 1px solid #FFFFFF;}
/*BODY STYLES*/
.text-regular, ul {font-size: 14px; line-height: 22px; text-align: left;}
.text-regular &gt; a {font-weight: 600; color: #425563; text-decoration: none !important;}
.text-regular &gt; a &gt; span {font-weight: 600; color: #425563; border-bottom: 1px solid #425563;}
.text-regular-r {font-size: 14px; line-height: 22px; color: #FFF; text-align: left;}
.text-regular-r &gt; a {font-weight: 600; color: #FFFFFF; text-decoration: none !important;}
.text-regular-r &gt; a &gt; span {font-weight: 600; color: #FFFFFF; border-bottom: 1px solid #FFFFFF;}
.text-small {font-size: 12px; line-height: 16px; color: #425563;}
.text-small &gt; a {color: #425563; text-decoration: none !important;}
.text-small &gt; a &gt; span {font-weight: 600; color: #425563; border-bottom: 1px solid #425563;}	
.text-regular &gt; img, .text-regular-r &gt; img, .text-small &gt; img {width: 12px;}
/* RESPONSIVE STYLES */
.mobile-only {display: none;}
@media screen and (max-width: 768px) {
.mobile-only {display: block !important;}
.mobile-hide {display: none !important;}
.rspnsv, .rspnsv &gt; tr {display: block !important; width: 100% !important;}
p {width: 95% !important; padding: 0 2.5% !important;}
.picture {display: block !important; width: 100% !important; height: unset !important;}
.picture-r {display: block !important; width: 95% !important; height: unset !important; padding: 0 2.5% !important;}
.contact_icon, .button {padding-left: 2.5%;}
}
&lt;/style&gt;

I've tried a few tricks like adding styling for smaller breakpoints to increase font size to no avail. Why is it displaying like this only in ios Mail?

答案1

得分: 0

通常这是因为某个元素过大,因此电子邮件客户端会缩小一切以适应它。

通常的罪魁祸首是图像 - 请确保它是响应式的,即您可能需要添加 style="max-width:100%;height:auto;"

英文:

Typically this is because of an oversized element, and so the email client shrinks everything down to fit it all in.

The usual culprit is an image - make sure it's responsive, i.e. you might add style=&quot;max-width:100%;height:auto;&quot; to it.

huangapple
  • 本文由 发表于 2023年2月24日 04:10:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/75549840.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定