printinh时隐藏特定标签 [英] Hide a specific label when printinh

查看:111
本文介绍了printinh时隐藏特定标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想隐藏一个打印标签,在这种情况下,页面底部有一个免责声明,我想隐藏免责声明文本和是和否同意复选框按钮。只有印刷所以当它的印刷视图被隐藏但是在形式时他们必须在提交同意免责声明之前检查框



我试过的:





Hi,
I want to hide a print label in this case there is a disclaimer at the bottom of the page and I want to hide the disclaimer text and the yes and no agree checkbox buttons. Only in print so when its print view it's hidden but when in form they have to check the box before they submit agreeing with the dislaimer

What I have tried:















No
























所有你不想打印的东西


all the stuff you don't want to print













推荐答案

执行以下操作:



HTML:

Do something like this:

HTML:
<div class="noprint">
all the stuff you don't want to print
</div>



CSS:


CSS:

@media print {.noprint {display:none}}



查看它使用您的浏览器打印预览。


Check it out using your browser print preview.


这篇关于printinh时隐藏特定标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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