Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/288.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 发送电子邮件时,在iOS上的MailApp中居中图像时出现问题_C#_Html_Css_Email Attachments_Macos Mail App - Fatal编程技术网

C# 发送电子邮件时,在iOS上的MailApp中居中图像时出现问题

C# 发送电子邮件时,在iOS上的MailApp中居中图像时出现问题,c#,html,css,email-attachments,macos-mail-app,C#,Html,Css,Email Attachments,Macos Mail App,在客户从我的.net MVC应用程序注册后,我会向他们发送一封html格式的响应电子邮件。我的问题是,无论我应用了什么css或引导类,在本例中是我的徽标的图片都不会居中。在计算机上渲染时,甚至在ios上的另一个不同邮件客户端中渲染时,它看起来都很好。问题似乎是默认的邮件应用程序。下面是它的表现。第一张图片是它在邮件应用程序上的显示方式,第二张图片是它在正确显示的桌面上的显示方式。请注意,白色文本为图片。紫色的背景只是我用紫色做的一个div 这是我的密码: <!DOCTYPE html&

在客户从我的.net MVC应用程序注册后,我会向他们发送一封html格式的响应电子邮件。我的问题是,无论我应用了什么css或引导类,在本例中是我的徽标的图片都不会居中。在计算机上渲染时,甚至在ios上的另一个不同邮件客户端中渲染时,它看起来都很好。问题似乎是默认的邮件应用程序。下面是它的表现。第一张图片是它在邮件应用程序上的显示方式,第二张图片是它在正确显示的桌面上的显示方式。请注意,白色文本为图片。紫色的背景只是我用紫色做的一个div

这是我的密码:

<!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>

欢迎来到教堂乐师!
.标题{
背景色:暗色;
高度:200px;
最大宽度:100%;
显示器:flex;
对齐项目:居中;
证明内容:中心;
}
.集装箱{
背景色:白色!重要;
}
身体{
背景色:白烟!重要;
}

这是一个测试