是@Page {size:landscape}已过时吗? [英] Is @Page { size:landscape} obsolete?

查看:2565
本文介绍了是@Page {size:landscape}已过时吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CSS规则

@page {size: landscape;}

应该强制浏览器以横向模式打印页面。这个规则在stackoverflow,许多其他编程网站以及参考着作如O'Reilly的HTML / XTHML The Definitive Guide,第五版中有很多问题。

is supposed to force browsers to print pages in landscape mode. This rule is mentioned in many questions on stackoverflow, on many other programming sites, and in reference works such as O'Reilly's HTML/XTHML The Definitive Guide, Fifth Edition.

我试图使用这种CSS规则与许多不同的格式调整与内联样式和链接样式表,指定媒体,而不指定媒体,与IE8,Chrome 7.0和Firefox 3.6。我试过打印到Xerox Phaser 8560和Adobe PDF打印驱动程序。我所有的测试都是在Windows Vista Ultimate 64位上完成的。

I've tried to using this CSS rule with many different format tweaks with both inline styles and linked style sheets, specifying media and not specifying media, with IE8, Chrome 7.0, and Firefox 3.6. I've tried printing to a Xerox Phaser 8560 and to the Adobe PDF print driver. All of my testing has been done on Windows Vista Ultimate 64 bit.

我从来没有看到这个CSS规则实际工作,即我从来没有见过一个页面打印景观任何尝试。诚然,由于我只尝试了2个打印机驱动程序和一个操作系统,所以我没有做过真正彻底的质量检查。

I have never see this CSS rule actually work, i.e. I've never seen a page print landscape on any attempt. Admittedly I haven't done really thorough QA on this, since I've only tried 2 printer drivers and one OS.

你实际上已经看到这个规则适用于浏览器,操作系统和打印机配置?在这个主题的其他问题上有一些提到,该规则没有得到广泛支持。因为我不能让它在我的开发机上工作,我想知道什么时候,如果有,它的工作?

Have you actually seen this rule work for a browser, OS, and printer configuration? There is some mention in other questions on this topic that the rule is not broadly supported. Since I can't get it to work on my development machine at all I am wondering when, if ever, does it work? It would help to get specifics on browser, OS, and printer combinations that are known to work, or to confirm that this is a waste of time.

推荐答案

CSS 2.1 不再指定 size 属性。 CSS3分页媒体模块的当前工作草案确实指定了它(但这不是标准或公认)。我没有能够找到一个特定的浏览器/版本支持的报告,但我得到的意义是,它是很差的支持(可能只有由Opera?)。

CSS 2.1 no longer specifies the size attribute. The current working draft for CSS3 Paged Media module does specify it (but this is not standard or accepted). I have not been able to find a report of specific browser/version support, but I get the sense that it is poorly supported (perhaps only by Opera?).

这篇关于是@Page {size:landscape}已过时吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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