Print Scale by CSS

最后都变了- 提交于 2019-12-30 06:52:07

问题


On IE 8 and Firefox (3.6 and 4), 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?


回答1:


There is Zoom:

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

And moz/webkit-transform:

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




回答2:


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.




回答3:


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

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

</style>


来源:https://stackoverflow.com/questions/5717800/print-scale-by-css

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!