浏览器打印(IE FireFox) [英] Browser printing (IE FireFox)

查看:83
本文介绍了浏览器打印(IE FireFox)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的要求是打印屏幕上显示的页面.

我的页面上有一个带有垂直滚动的DIV.我将其滚动到页面上希望在打印物中看到的部分以及页面上的其他内容.

我使用浏览器打印,并从文件菜单调用打印预览.但是可悲的是,我的div滚动回到了顶部,而不是我的滚动在原始页面上的位置.

这是IE中的错误还是有解决办法?

谢谢,

Vj

Hi,

My requirement is to print a page as it looks on the screen.

On my page has a DIV with vertical scroll. I scroll it to a portion which I want to see in a print along with other content on the page.

I use browser printing and invoke the print preview from the file menu. But sadly my div scroll is back up to top and it is not where my scroll was on the original page.

Is this a bug in IE or is there any work around for this?

Thanks,

Vj

推荐答案

看看CSS媒体类型- W3Schools Media类型-使用CSS专门用于网站的打印版式.这使您可以自定义网站的打印输出,而无需更改浏览器中网站的外观.在您的情况下,您将不得不更改CSS,直到您将其打印出来(如它在屏幕上看起来一样)为止.请记住,如果您有一个灵活的(动态)布局(您应该这样做,如果我不建议您立即进行更改,那么不要在我的整个屏幕上填充网站就很烦人了!),如果您有一个灵活的布局版面配置,那么在大屏幕上显示的文字会比在800x600屏幕上显示的文字多,但您的打印输出(几乎始终)将在A4纸上进行-换句话说,对于不同的用户,打印输出和屏幕版本看起来并不完全相同.这不是问题,只需确保CSS即可轻松在A4纸上进行打印,而不管屏幕尺寸如何.您的印刷媒体CSS 应该使用固定宽度来实现此目的.
希望这会有所帮助,

埃德:)
Have a look into CSS Media Types - W3Schools Media Types - use CSS specifically for a print layout of your site. This allows you to customise the printout of your site without changing the look of the site in the browser. In your case you will have to change your CSS until you get it to print out as it looks on the screen. Remember, if you have a fluid (dynamic) layout (which you should and if you don''t I highly recommend you change now! It''s very annoying not having sites fill my whole screen!), if you have a fluid layout, then on large screens more text will be shown than on 800x600 screens but your printout will (almost always) be on A4 paper - in other words for different users the printout and screen versions will not look exactly the same. This is not a problem, just make sure your CSS makes it easy to print on A4 paper, regardless of scren size. Your Print Media CSS should use fixed widths to achieve this.
Hope this helps,

Ed :)


这篇关于浏览器打印(IE FireFox)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆