我正在使用 PHPMailer 發送電子郵件,但發送時表單 CSS 的各個方面不會進入郵件:調整內容:居中;對齊項目:居中還有字體系列。輪廓偏移:5px;有誰能告訴我為什么這些 CSS 沒有進入發送的電子郵件表單,而所有其他 CSS 加載都沒有問題?如果我在控制臺中輸入這些值,它們就會起作用,所以我不明白為什么在發送郵件時這些 CSS 值會從 DOM 中刪除。這是我的代碼:<style>@import url("https://fonts.googleapis.com/css2?family=Thasadith:ital,wght@0,400;0,700;1,400;1,700&display=swap");</style> <div style="background-color: #ffffff; margin: auto; width: 65%; border: 1px solid #e1e1e1; outline: 1px solid #e1e1e1; outline-offset: 5px; margin-top: 25px; margin-bottom: 25px;padding: 5px;"> <div style="display: flex; justify-content: center; align-items: center; background-color: #f35653; margin-bottom: 20px; padding: 30px 0px;"> <div style="background-image: url(https://i.imgur.com/XPTHrId.png); background-position: center; background-size: cover; width: 50px; height: 50px;"></div> <div style="font-size: 40px; text-transform: uppercase; align-self: center; color: white; font-family: Thasadith, sans-serif; font-weight: 700; margin-left: 5px;">Enkou Academy</div></div> <div style="padding: 10px 40px 40px;font-size: 15px;"> <p>We received a request to reset the password for your Enkou Academy account.<br><br> To reset the password, click on the link below:<br><br> <a href="' . $url . '" style="text-decoration: none; color: #f35652;">Click here!</a><br><br> If you didn't request a password reset, let us know.</p> </div> </div>'
- 0 回答
- 0 關注
- 136 瀏覽
添加回答
舉報
0/150
提交
取消