Sendgrid电子邮件在Gmail和Microsoft Outlook上的呈现方式不同

问题描述 投票:1回答:1

我在Sendgrid上创建了一个模板作为标准电子邮件,我在不同设备上的Gmail上测试过,它工作正常,直到我尝试Outlook,看起来我的所有CSS,图像都消失了。那根本原因是什么?

这是我的HTML代码:

<div style="font-family: 'Poppins', Helvetica, sans-serif;">
  <div style="background-color: black; position: relative; padding-top: 30px; padding-bottom: 30px;">
    <img src="image.png" 
      style="height: auto; width: 135px; position: absolute; top: 0; bottom: 0; margin: auto; padding-left: 16px;">
  </div>

  <div style="padding: 10px; text-align: center;">
    <img src="image.png" 
      style="width: 40px; height: auto; margin-bottom: 16px;">
    <p style="margin: 0; padding: 0; color: #00cc66; font-size: 24px; font-weight: bold;">Email Confirmation</p>
  </div>

  <div>
    <div style="padding: 16px; color: black;">
      <p>Hi -Name-,</p>
      <p>Welcome.</p>
      <p>Please confirm your email-address by clicking the button below.</p>
    </div>

    <div style="text-align: center; padding-bottom: 15px;">
      <a href="-EmailConfirmUrl-" target="_blank">
        <button style="border: none; cursor: pointer; background: #2840ff;
          color: white; width: 200px; height: 48px; text-transform: uppercase; 
          font-size: 0.8rem; outline-style: none; 
          background-image: linear-gradient(to top right, #2840ff, #22eaff); box-shadow: 0px 1px 15px -2px lightgrey;">
          Verify Email Now
        </button>
      </a>
    </div>

    <div style="text-align: center; background: #2840ff; color: white;
      background-image: linear-gradient(to top right, #2840ff, #22eaff); bottom: 0; padding: 4rem 0;">
      <img src="image.png" 
        style="height: 20px; width: 160px;">
        <p style="color: #ced4da; font-weight: 300;">
          Copyright © 2018. All rights reserved.
        </p>  
      </div>
    </div>
</div>
html css html-email sendgrid
1个回答
1
投票

如果必须在Outlook中使用,则不能在电子邮件中使用标准css3。

Outlook正在使用Microsoft Word的HTML呈现引擎(可悲,但确实如此)。

关于如何使(所有)客户端的电子邮件工作有很多惊人的提示和技巧。

这里只是一个视图链接:

© www.soinside.com 2019 - 2024. All rights reserved.