Nov 02
※作者:丁志刚 转载请注明:Minidx全文检索【http://blog.minidx.com/2007/11/02/43.html】
要想在打印网页时一并将背景图打印出来,首先需要设置:ie>>internet选项>>打印背景颜色和图像 Firefox->文件->页面设置->Option->打印背景颜色和图像 打勾,然后在CSS或html的<style> </style>中添加:
@media print{
body {
font-family: -serif;
font-size : 12pt;
background-color: white;
background: url(/image/background.jpg);
}
div.confidential {
text-align: center;
color:red;
font-size: 20pt;
font-weight:bold;
border: solid red;
}
}
@media screen{
div.confidential {
display:none;
}
}
