【发布时间】:2021-08-01 06:27:09
【问题描述】:
我有一个 HTML 模板,其中包含重复的背景图片,并且图片托管在 https://imgbb.com/ 上(图片如下:https://i.ibb.co/NKYLjxT/topography-compressed.png)。
这是 HTML:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' lang='en-GB'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
<title>NaviGATE
</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0'/>
</head>
<body style='margin: 0; padding: 50px 0 50px 0; background: url(https://i.ibb.co/NKYLjxT/topography-compressed.png); font-family: sans-serif; line-height: 1.6'>
<table role='presentation' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td>
<table align='center' border='1' cellpadding='0' cellspacing='0' width='600' style='border-collapse: collapse;'>
<tr>
<td>
<table style='border-collapse: collapse; width: 100%'>
<tr>
<td align='center' bgcolor='#ffffff' style='padding: 40px 0 30px 0;'>
<img src='###company logo###' alt='' width='300' style='display: block;'/>
</td>
</tr>
<tr>
<td bgcolor='#ffffff' style='padding: 40px 30px 40px 30px;'>
<p style='margin: 0;'>BODY OF EMAIL
<br/>
<br/>
</p>
</td>
</tr>
<tr>
<td bgcolor='#2f3c48' style='padding: 10px 30px 10px 30px;'>
<p style='margin: 0;'>
<a href='#homepage#' style='color: #ffffff'>internal home page
</a>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
在 Outlook 365 中查看电子邮件时,最初不会显示背景图像。 但是当调整窗口大小时,它会像正常显示一样。在另一台使用 Outlook 365 的计算机上的行为相同。在 Gmail 上一切正常。
我可以在 HTML 中做一些不同的事情来强制它显示吗?
我已经尽可能地压缩了图像。我尝试使用图像的矢量在内联 CSS 中使用它,但它不起作用(代码很庞大)。我试过用 Base64 编码,也没有运气。
我不认为这是 Outlook 设置,因为大约一个月前,当我最初测试模板时,它看起来很正常。也许最近的补丁打破了它?我不知道。使用Version 2104 (Build 13929.20296)
【问题讨论】:
标签: html css email outlook html-email