gpt4 book ai didi

html - css 在 gmail 中未完全显示

转载 作者:行者123 更新时间:2023-12-03 08:37:53 26 4
gpt4 key购买 nike

我正在尝试使用 php 邮件功能向用户电子邮件发送一封验证电子邮件,该电子邮件采用 html 和 css 格式。在邮件中,所有内容都显示,颜色,字体大小等,但 flex-direction 和其他 flex 命令不起作用,我什至检查了电子邮件,发现它甚至没有包含在代码中,而我在电子邮件中发送它这是 HTML:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Recover</title>
<link rel="shortcut icon" type="image/x-icon" href="./img/logo.png" />
<style>
*{
padding: 0;
margin: 0;
font-family:"Segoe UI", Tahoma, Geneva, Verdana, sans-serif
}


.recover a {
display: flex;
align-items: center;
justify-content: space-around;
text-decoration: none;
font-weight: 500;
width: 50%;
height: 20%;
background: #00a761;
color: white;
font-size: 15px;
}

.recover a:hover {
background: #00d67d;
}
.recover h1 {
color: white;
margin-bottom: 1%;
}
.recover p {
color: #afafaf;
width: 50%;
text-align: center;
margin-bottom: 1%;
}
.recoverall .recover{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: 5px;
width: 80%;
height: 250px;
background: #292929;
}
.recoverall{
display: flex;
justify-content: space-around;
background: #070707;
width: 100%;
height: 100vh;
padding-top: 5%;
}

@media screen and (max-width: 768px) {
.recover h1 {
font-size: 15px;
}
.recoverall {
width: 100%;
}
.recover p {
font-size: 10px;
width: 95%;
}
.recover a {
width: 70%;
}
}
</style>
</head>
<body>
<div class="recoverall">
<div class="recover">
<h1>Recover Your Password</h1>
<p>
We Have Recive a request Fom this Account to reset Your password, if
you have not sent this request ignore, but if You Are the One that
sent it, Click the button Below
</p>
<a href='XXX'>Click Here To Continue</a>
</div>
</div>
</body>
</html>

这应该显示: enter image description here

但这就是 gmail 显示的内容: enter image description here

当我检查 gmail 并检查 css 时,看到的是: enter image description here

没有 flex-direction 或其他我该怎么办?

最佳答案

我认为 Gmail 不支持 Flex https://www.campaignmonitor.com/css/flexbox/flex/

关于html - css 在 gmail 中未完全显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63358329/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com