发送电子邮件时,iOS上MailApp中的问题居中图像

问题描述

在我的客户从.net MVC应用程序注册后,我正在向他们发送html格式的响应电子邮件。我的问题是,无论我使用哪种CSS或引导类,在这种情况下都是我的徽标的图片都不会居中。在计算机上或什至在ios上的其他不同邮件客户端中进行渲染时,它看起来都不错。问题似乎是认的邮件应用程序。这是它的显示方式。第一张图片邮件应用程序上的显示方式,第二张图片是在正确显示的桌面上的显示方式。请注意,白色文字图片。紫色背景只是我制作紫色的div。

Image on iOS Mail App

Image on Desktop

这是我的代码

<!DOCTYPE html>

<html>
<head>
    <Meta name=viewport content="width=device-width,initial-scale=1">
    <title>Welcome To Church Musician!</title>
    <style>
        .header {
            background-color: darkviolet;
            height: 200px;
            max-width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }


        .container{
            background-color: white !important;
        }

        body{
            background-color: whitesmoke !important;
        }
        
    </style>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
    <div class="container" >
        <div class="header">
            <img class="img-fluid"src="cid:id1" />
        </div>   
        <hr />
        <p>This is a test</p>

    </div>
</body>
</html>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)