开发者

Print Scale by CSS

开发者 https://www.devze.com 2023-02-27 05:34 出处:网络
On IE 8 and Firefox (3.6 and 4),开发者_StackOverflow社区 if you go to Print Preview, you adjust the Print Scale by a a percentage or use Shrink to Fit. Does CSS have a property like scale:50%; or some

On IE 8 and Firefox (3.6 and 4),开发者_StackOverflow社区 if you go to Print Preview, you adjust the Print Scale by a a percentage or use Shrink to Fit. Does CSS have a property like scale:50%; or something to adjust the print scale?


There is Zoom:

http://reference.sitepoint.com/css/zoom

And moz/webkit-transform:

http://help.dottoro.com/lcebdggm.php


<style type="text/css" media="print">

body {
  zoom:75%; /*or whatever percentage you need, play around with this number*/
}

</style>


Since zoom or -ms-zoom doesn't work the way I expected it to on IE8, I ended up fiddling with the font-size and tr sizes. Hopefully MS makes a zoom that works like the Print Scale/Size functionality in the Print window from the browser.

0

精彩评论

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