使用 IE9、10、11 的 CSS 将比例打印到 50% 左右 [英] print scale to some % like 50% by using CSS for IE9,10,11
本文介绍了使用 IE9、10、11 的 CSS 将比例打印到 50% 左右的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
缩放 css 属性不适用于 IE9、10、11.在打印预览 UI 令人不安时观察到,默认比例为缩小以适应.当我将此比例从缩小更改为适合 50% 时,页面显示正确(打印预览).有人可以帮助我如何使用 CSS 代码将比例设置为 50%.
Zoom css property not working for IE9,10,11. Observed while print preview UI disturbing and the default scale is Shrink to fit. When i changed this scale from Shrink to fit to 50% the page is displaying properly(print preview).Can any one help how can i set scale to 50% using CSS code.
推荐答案
<style type="text/css" media="print">
body {width: 200%;height: 200%;margin: -50% -50%;}
</style>
在为页面添加上述打印 CSS 后,它在 IE 中按预期工作(稍微好一些).
After adding above print CSS for page, it is working as expected in IE (somewhat better).
对于 Edge,我添加了以下代码用于缩放:
For Edge, I added the following code for scaling:
<style type="text/css" media="print">
body {zoom: 50%;}
</style>
这篇关于使用 IE9、10、11 的 CSS 将比例打印到 50% 左右的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文