我是Web開發人員,幾乎從不使用設計,但已經給出了我正在努力糾正的這個錯誤。在IE/Chrome/Firefox中打印預覽(或打印)時不顯示圖像
當我打印/顯示打印預覽頁面時,某些圖像顯示正確,但其他圖像不顯示。我可以看到的關鍵區別在於,不出現的圖像是在css中應用圖像的span標籤,而工作圖像使用img標籤。
下面是HTML的例子:
跨度與 「圖標」 出生不顯示:
<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標籤而不是跨度。 – IntoTheBlue