如何打印带有徽标的网页 [英] how to print webpage with logo

查看:92
本文介绍了如何打印带有徽标的网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打印一个网页.但是我也想在打印过程中仅在网页上打印我的徽标,但该徽标不在原始网页上显示.它是在打印网页上动态生成的.我该怎么做? ="h2_lin">解决方案

使用两种不同的CSS网页技术.一种用于在浏览器中查看网站,另一种用于打印.在此处 [


另一种方法是将徽标放置在页面上带有display:none属性.

然后使用javascript创建一个新窗口.将原始页面正文的内容写入该窗口,并将徽标(图像)的属性设置为display:block.然后打印刚刚创建的窗口对象的新实例.
希望对您有帮助.
问候
Ahsan Sarfraz


i want to print a webpage.But i also want to print my logo only on webpage during printing but that logo is not present on original webpage .It is dynamically generated on printing webpage.How can i do this?

解决方案

Using technique of having two different CSS for webpage. One for website viewing in browser and other for printing. A read on it here[^].

Keep image on website but set the style display property to hidden.

Have a different style property for Printing and there keep the display propert value as ''none'' and thus the image should be visible there.


another way is to place the logo on your page with display:none property .

and then using javascript create a new window. write the contents of the body of original page to that window and set the property of Logo (image) to display:block. then print the new instance of the window object you just created.
hope it will help.
regards
Ahsan Sarfraz


这篇关于如何打印带有徽标的网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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