这是我现在的流程:
- 将更改保存到print.css
- 打开浏览器并刷新页面.
- Right-click and choose Print > Print Preview (Firefox, but any browser really)
这是第三步困扰着我,我想知道是否有可能用一个插件或什么东西把它从这个过程中go 掉.只需 Select 将页面作为打印介质查看,然后只需刷新即可查看更改.
如何测试打印样式表?您总是在刷新后单击打印预览吗?
这是我现在的流程:
这是第三步困扰着我,我想知道是否有可能用一个插件或什么东西把它从这个过程中go 掉.只需 Select 将页面作为打印介质查看,然后只需刷新即可查看更改.
如何测试打印样式表?您总是在刷新后单击打印预览吗?
您可以使用邮寄See print css in the browser中接受的ChromeMedia Type Emulation.
UPDATE 21/11/2017
更新的DevTools文档可以在这里找到:100.
在打印模式下查看页面:
UPDATE 29/02/2016
DevTools文档已移动,上述链接提供的信息不准确.有关媒体类型仿真的更新文档可在此处找到:Preview styles for more media types.
Open the DevTools emulation drawer by clicking the More overrides ••• more overrides icon in the top right corner of the browser viewport. Then, select Media in the emulation drawer.
UPDATE 12/04/2016个
不幸的是,文档似乎没有在打印仿真方面进行更新.但是,Print Media Emulator已(再次)移动:
请参见下面的屏幕截图:
UPDATE 28/06/2016个
Google Developers Docs around Chrome DevTools and the "Emulate Media" option have been updated for Chrome >51:
https://developers.google.com/web/tools/chrome-devtools/settings?hl=en#emulate-print-media
To view a page in print preview mode, open the DevTools main menu, select More Tools > Rendering Settings, and then enable the emulate media checkbox with the dropdown menu set to print.
UPDATE 24/05/2016个
设置的命名再次更改:
To view a page in print preview mode, open the DevTools main menu, select More Tools > Rendering, and then enable the Emulate CSS Media checkbox with the dropdown menu set to print.