来自 37 Signals 的 Jason 在 Signal vs. Noise 博客上发布了一篇 很棒的文章,介绍了打印样式表可以多么简单,同时仍然有效。 基本上使用 display: none;
大规模应用。 人们不需要您的页眉、页脚或导航。 如果他们试图打印您的网页,他们就是在试图打印内容,所以把内容给他们。
以下是理论
#header, #navigation, #footer, .any, .random, .junk, .on, .your, .page, .that, .shouldnt, .print {
display: none;
}