我希望每个打印页面都重复我的表格标题,但似乎谷歌Chrome不能<thead>很好地支持标签......有没有办法解决这个问题?我正在使用Google Chrome v13.0.782.215.
表格代码非常简单......没什么特别的:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css" media="all">
@page {
size: landscape;
margin-top: 0;
margin-bottom: 1cm;
margin-left: 0;
margin-right: 0;
}
table {
border: .02em solid #666; border-collapse:collapse;
width:100%;
}
td, th {
border: .02em solid #666; font-size:12px; line-height: 12px;
vertical-align:middle; padding:5px; font-family:"Arial";
}
th { text-align:left; font-size:12px; font-weight:bold; }
h2 { margin-bottom: 0; }
</style>
</head>
<body>
<h2>Page Title</h2>
<table>
<thead>
<tr class="row1">
<th><strong>Heading 1</strong></th>
<th><strong>Heading 2</strong></th> …Run Code Online (Sandbox Code Playgroud) 我div在页面上有很多s,其中包含可变数量的内容.我试图使用,page-break-inside: avoid;以便每个div部分不会超过2页.
它适用于Firefox但不适用于IE8.
我在CSS打印文件中有这个
.page-break-inside-avoid { page-break-inside: avoid; }
Run Code Online (Sandbox Code Playgroud)
而我的divs就像上课一样 <div class="page-break-inside-avoid">
IE8现在应该支持这个.不是吗?
难道我做错了什么?有谁解决了这个问题?或者有过任何经验?
任何帮助都会很棒.
非常感谢理查德