如何删除损坏的图像框?

2024-04-17

我正在尝试构建一个电子邮件模板,其中我必须向不同的邮件客户端(例如 Outlook、thunderbird...)显示一些图像。现在的问题是,当这些客户端不允许显示图像时,会显示我不想显示的损坏的图像框。

我也参考过

参考链接1 https://i.stack.imgur.com/BgR34.jpg: 如何删除 webkit 中损坏图像周围的边框? https://stackoverflow.com/questions/13151340/how-to-remove-borders-around-broken-images-in-webkit

参考链接[2]:input type="image" 在 Chrome 中显示不需要的边框,在 IE7 中显示损坏的链接 https://stackoverflow.com/questions/4108983/input-type-image-shows-unwanted-border-in-chrome-and-broken-link-in-ie7

参考链接[3]:如何停止显示损坏的图像 https://stackoverflow.com/questions/6622353/how-to-stop-broken-images-showing

但无法找到任何正确的输出。 注意:我不能使用 div 标签。我必须使用表格标签。

代码我正在使用什么:

<table style="background:#fff; width:600px; margin:auto auto;">
<tr>
    <td>
    <a href="http://www.sampleurl.com">
    <img src="http://sampleimageurl.com/sampleimage.png" height="55" width="198" />
    </a>
    </td>
    <td style="text-align:right;"><a href="http://www.sampleurl.com" target="_blank">
        <span style="font-family:Myriad Pro; color:#0d5497; font-size:20px;">www.sampleurl.com</span>
    </td>
</tr>

<!--<tr>
    <td colspan="2" style="height:1px; background: #0d5497;"></td>

</tr>-->

OUTPUT what i get. enter image description here


use alt这里作为后备

demo http://jsfiddle.net/v8DLe/

html

<img src="abc" alt="image" />

css

img {
    width:200px;
    height:200px;
}

或者,如果你不想显示任何alt text,只需留一个空格即可。

演示在这里 http://jsfiddle.net/v8DLe/1/

HTML

<img src="abc" alt=" " />
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何删除损坏的图像框? 的相关文章