【发布时间】:2012-09-13 02:40:51
【问题描述】:
我是 Web 开发人员,几乎从不从事设计工作,但遇到了这个我正在努力纠正的错误。
当我打印/显示打印预览页面时,某些图像显示正确,但其他图像却没有。我可以看到的主要区别是,没有出现的图像是跨度标签,图像应用在 css 中,而工作图像使用 img 标签。
以下是 html 示例:
带有“icon”出生的跨度不显示:
<li class="media">
<div class="img">
<div class="h2 mtm">1889</div>
<span class="timeline-icon icon-birth"></span>
</div>
<div class="bd">
<h3 class="profile-subtitle mts">Born in ?</h3>
<p class="deemphasis mbn">
<a href="/search/results/bmdindexedbirths/bibby/elizabeth%20?yearofbirth=1889">Search for Birth Record</a>
</p>
</div>
</li>
Image.gif 是否显示:
<li class="media">
<div class="img">
<div class="h6">
<strong>Spouse</strong></div>
<img src="image.gif" alt="" class="person-thumb dropshadow" />
</div>
<div class="bd">
<p class="mbn">Husband</p>
<h3 class="profile-subtitle">
<a href="path">Thomas <strong>Name</strong></a>
</h3>
<p class="mbn">?-?</p>
</div>
</li>
在某些浏览器中,它在预览中看起来不错,但无法打印,在其他浏览器中却没有,而且仍然无法打印。
提前谢谢你!
【问题讨论】:
-
图像未打印,因为它们是背景图像,并且浏览器设置为不打印这些图像。这可以在某些浏览器中手动更改。解决方案是使用 html img 标签而不是 span。
标签: css internet-explorer firefox google-chrome print-preview