开发者

How to print background images/styles without tweaking the browser page setup?

Is there any way to print out something like, when the user Prints out the page?

<div id="test" style="background:#000000; color:#FFFFFF">Black Stripe</div>

I'm trying to create a page with row striping in the printout the same way it appears on screen. When they go to print, it of course drops the background.

Besides telling each user how to enable print backgrounds in their b开发者_如何学JAVArowser, is there a way programmatically via CSS, HTML or JavaScript to do this?


Nope, that's completely dependent on the browser's settings that you can't change with JavaScript or CSS.


The only way is to have images behind your rows.


I haven't tried, but perhaps setting a style sheet for printers?


If you use internet explorer this is sure gonna work

  • go to 'tools menu'.
  • click on 'internet options'.
  • click on advanced tabs.
  • put a check on print background color and images.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜