奇怪的打印问题
我们网站上的某个页面在打印时无法正确显示!
我们在网站上还有一个打印按钮,当您按下它时,它会在一个新的弹出窗口中打开页面的“打印优化”版本,其中背景颜色被剥离等。它在该窗口中正确显示,但当我按下“确定”按钮时在打印对话框上它看起来仍然很糟糕。坦率地说,我什至不知道从哪里开始解决这个问题。任何帮助都会很棒!
当您从浏览器中按打印预览时,它也显示得很糟糕。页面在浏览器中看起来是一种方式,而在按下打印预览时看起来却完全不同,这怎么可能呢?该页面是使用基于 phptal 的模板制作的(不知道这是否相关)
谢谢!
更新: 我已经用 firebug 进行了测试并更改了样式表上的媒体。页面的主样式表似乎同时应用于屏幕和打印(我将其设置为全部),它只是打印预览与浏览器上的外观不同。
We have a certain page in our site that when you print, it doesn't come out properly!
We also have a print button on the site that when you press it opens a "printing optimized" version of the page in a new popup window with background colors stripped, etc. It shows up correctly in that window but when I press the ok button on the print dialog it still looks terrible. I frankly don't even know where to begin with this problem. Any help would be great!
When you press print preview from the browser, it shows up terrible as well. How could a page look one way in your browser and look completely different when you press print preview? The page is made using phptal based templates (don't know if that's relevant)
Thanks!
Update:
I've tested with firebug and changing the media on my stylesheets. It seems like the main stylesheet for the page IS being applied to both screen and print (I have it set to all), it just looks differently it print preview than it does on my browser.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一番搜索,我意识到该页面上的图像是作为背景图像输入的(在 div style="background-image..." 中)!这就是为什么浏览器会丢弃它们,而我却遇到了这种奇怪的行为。如果我将图像更改为实际的前景图像(img 标签),它就可以正常工作!
After some searching, I realized that the images on that page were coming in as background images (in the div style="background-image...")! That is why the browser was dropping them and I was getting this strange behavior. If I change the images to actual foreground images (img tag) it works just fine!