【发布时间】:2019-04-24 05:02:12
【问题描述】:
大家,
我设计了一个快速的 html 文档,它将被合并到 Outlook 中(因此需要在 HTML 中包含内联样式)。在 Chrome 和 Safari 上一切正常,但 IE11 显示以下问题。表格边框乱七八糟,就像它里面有两种颜色,而不是只有一种,就像 Chrome 上的好版本一样。此外,Firefox 似乎忽略了为颜色设置的表格并显示了它的斜面版本......有人对此有任何想法吗?我在下面粘贴示例图像和我的代码。
image depicting bug in IE against good version on Chrome
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Xmas Card</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body style="margin: 0; padding: 60px 300px 60px 300px; background-color:#d2d2d1">
<table>
<tr>
<div style="text-align:center; margin-bottom:20px">
<span style="font-family:sans-serif; font-size:10pt"><a href="#">If you have problems opening this message, read online here</a></span>
</div>
</tr>
</table>
<table border="8" rules="none" bordercolor="#8a7e70" cellpadding="0px" cellspacing="0" align="center" width="600px">
<tr style="background-color:#ffffff" align="center">
<td>
<img src="#" alt="corners top">
</td>
</tr>
<tr style="background-color:#ffffff" align="center">
<td>
<img src="#" alt="logo">
</td>
</tr>
<tr style="background-color:#ffffff" align="center">
<td>
<h1 style="font-size:24pt; font-family:sans-serif; color:#aa212f; text-align:center">Season's Greetings</h1>
</td>
</tr>
<tr style="background-color:#ffffff" align="center">
<td>
<img src="#" alt="Xmas branches">
</td>
</tr>
<tr style="background-color:#ffffff" align="center">
<td>
<a href="#"><img src="/#" alt="button"></a>
</td>
</tr>
<tr style="background-color:#ffffff" align="center">
<td>
<img src="#" alt="corners bottom">
</td>
</tr>
</table>
</body>
</html>
非常感谢你的好意。
【问题讨论】:
标签: html internet-explorer html-table