[英]How to change the background color of a HTML page for printing?
I want to make my website properly printable. 我想使我的网站可正确打印。 The
body
of the HTML document has a background color other than white. HTML文档的
body
具有白色以外的背景色。
body {
background-color: #F8F6F6;
}
The problem is that some parts of the background of the printed page (the margins and the part after the document end) are white as shown below: 问题是打印页面的背景的某些部分(页边距和文档结束后的部分)是白色的,如下所示:
How can I change the color of these areas? 如何更改这些区域的颜色?
#F8F6F6
, not the opposite.
#F8F6F6
,而不是相反。
@media print{
body {
background-color: #FFFFFF;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.