您如何使网页向浏览器窗口发送的内容不同于打印机? [英] How can you make a web page send to the printer something different than what's in the browser window?

查看:44
本文介绍了您如何使网页向浏览器窗口发送的内容不同于打印机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Maps通常会执行此操作,当您单击打印"链接时,发送给打印机的内容与屏幕上显示的不完全相同,而是格式几乎相同的不同版本.

Google Maps used to do this bit where when you hit the "Print" link, what would be sent to the printer wasn't exactly what you had on the screen, but rather a differently-formatted version of mostly the same information.

看来他们已经大大偏离了这个概念(我想人们对此并不了解),并且大多数网站都有诸如文章之类的东西的印刷版".

It appears that they've largely moved away from this concept (I guess people didn't understand it) and most websites have a "print version" of things like articles and so forth.

但是,如果您要制作一个网页,以使该页面的打印机友好"版本发送到打印机而不必为其创建单独的页面,您将如何做?

But if you wanted to make a webpage such that a "printer friendly" version of the page is what gets sent to the printer without having to make a separate page for it, how would you do that?

后续:您可以打印页面上未呈现的内容吗?(即从当前渲染中隐藏)?

Follow-up: can you have things be printed that are not rendered on the page? (i.e., hidden from currently being rendered)?

推荐答案

是的,您可以应用打印机CSS.此处.

Yes, you can apply a printer css. There is a good article about it here.

这篇关于您如何使网页向浏览器窗口发送的内容不同于打印机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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