设置打印css的好规则? [英] Good rules for setting up print css?
本文介绍了设置打印css的好规则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找任何建议/规则/指南,在打印网页时制作一个体面的打印css。
I'm looking for any suggestion/rules/guides on making a decent print css for when a webpage is printed. Do you have any to offer?
推荐答案
以下是一些常用的打印样式,用于获得更好的打印输出:
Here are some general print styles to use to get better print outs:
/* Print styles */
@media print
{
tr, td, th {page-break-inside:avoid}
thead {display:table-header-group}
.NoPrint {visibility:hidden; display:none}
a {color:#000000}
}
NoPrint是一个我用来在屏幕上显示内容但不打印的类。
NoPrint is a class I use to show something on the screen, but not in print.
而且,我喜欢关闭链接颜色。
And, I like to turn off link colors.
这篇关于设置打印css的好规则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文