我有從我的網站打印報告的頁面,並且我設置了顯示網格結果的表格。打印頁面時顯示背景顏色
所以,我的問題是,我設置爲th
attrbute表背景色,這個背景是在打印前在頁面上顯示它的,但是打印它時,th
背景沒有顯示。
這裏我的CSS代碼: -
@media print {
.head th {
background: #CCCCCC;
background: -webkit-gradient(linear, left top, left bottom, from(#CCCCCC), to(#CCCCCC));
background: -moz-linear-gradient(top, #CCCCCC, #CCCCCC);
border: 1px solid #000000;
font-size: 16px;
text-align: center;
font-weight:bold;
padding:10px;
}
}
.wrap{
width: auto;
background:#fff;
word-wrap: break-word;
margin:30px;
}
th {
background: #CCCCCC;
background: -webkit-gradient(linear, left top, left bottom, from(#CCCCCC), to(#CCCCCC));
background: -moz-linear-gradient(top, #CCCCCC, #CCCCCC);
border: 1px solid #000000;
font-size: 16px;
text-align: center;
font-weight:bold;
padding:10px;
}
我怎樣才能顯示th
backgound當我打印此頁。
在您的瀏覽器中確保打印背景顏色和圖像選項被選中。 – BK004 2013-04-27 19:26:43