隐藏文字打印 [英] Hide Text From Printing

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

问题描述

我在这里有一个打印页面:

http://www.souq4cars.com/ppreview.php?id=611111161&u=10064&t=users_cars



如何在底部隐藏链接,说明关闭窗口和打印页面在打印页面上打印?

解决方案

您可以使用 CSS @media规则为了这。首先,向这两个元素添加一个类 noprint

 < ; a class =noprint> foo< / a> 

,然后添加 @media print 规则添加到您在打印期间隐藏元素的CSS:

  @media print {
.noprint {
display : 没有;
}
}


I have a print page here:

http://www.souq4cars.com/ppreview.php?id=611111161&u=10064&t=users_cars

How do i hide the links at the bottom saying 'Close Window' and 'Print Page' from being printed on the printed page?

解决方案

You could use the CSS @media rule for this. To start, add a class noprint to the both elements:

<a class="noprint">foo</a>

and then add a @media print rule to your CSS which hides the elements during print:

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

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

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