Html 使用css的AD重复
我使用css媒体查询在每一页上打印页眉,它工作得很好,但当我增加大于两列的列或增加最后一列的字体大小或设置高度时,它不工作,即它不会在所有页面上打印 我无法理解出了什么问题。我想使用表结构完成它,而不是使用divHtml 使用css的AD重复,html,css,printing,media-queries,Html,Css,Printing,Media Queries,我使用css媒体查询在每一页上打印页眉,它工作得很好,但当我增加大于两列的列或增加最后一列的字体大小或设置高度时,它不工作,即它不会在所有页面上打印 我无法理解出了什么问题。我想使用表结构完成它,而不是使用divposition:fixed。请检查下面的代码或建议完成此任务的任何其他代码 提前谢谢 <!–-css code -–> <style> @media print { thead { display: table-header-group;
position:fixed
。请检查下面的代码或建议完成此任务的任何其他代码
提前谢谢
<!–-css code -–>
<style>
@media print {
thead { display: table-header-group;}
}
</style>
<!–-css code- –>
<!–-html code -–>
<table id=”tbl_head” width=”100%”>
<thead>
<tr>
<th style=”border-bottom:2px solid #999;”>
<!--Customize Header -->
<table width="100%">
<tbody>
<tr>
<td colspan="3">
<h4 style="text-align: center; font-weight: normal; background: #ccc none repeat scroll 0% 0%; font-size: 16px; padding: 8px 0px; margin: 2px 0 0 0; border: 1px solid #000;">FULLY COMPUTERISED LAB</h4>
</td>
</tr>
<tr>
<td style="text-align:left;">
<span style="text-align: left;margin-bottom: 0px;font-size: 22px;font-weight:bold">Test</span>
<span style="font-size: 12px;margin-top: 5px">Test Centre</span>
</td>
<td style="text-align:left;">
<span style="font-size:18px;margin-bottom: 2px;margin-top: 2px">Dr. sharma</span>
<span style="margin-top:2px">M.D.</span>
</td>
<td style="text-align:left;">
<span style="font-size:10px"><b>Address</b></span>
<span style="font-size:10px"><b>Phone: 0731-787878, Mobile: </b></span>
<span style="font-size:10px"><b>Email: example2514@gmail.com</b></span>
<span style="font-size:10px"><b>Time: 7:30am to 10pm; Sunday 8am to 1pm</b></span>
</td>
</tr>
</tbody>
</table>
<!--Customize Header -->
</th>
</tr>
</thead>
<!--thead tag close -->
<tbody>
<tr>
<td>
<!-- some other code here -->
</td>
</tr>
</tbody>
</table>
<!–-html code -–>
@媒体印刷品{
thead{display:表头组;}
}
全电脑化实验室
测验
考试中心
沙玛博士
医学博士。
住址
电话:0731-7878,手机:
电邮:example2514@gmail.com
时间:上午七时三十分至晚上十时;;星期日上午8时至下午1时
我相信这个例子会对你有所帮助。有了它,你可以把你的文字在任何数量的独立列!
这是电子邮件吗?如果不是,那么您不应该以您现在的方式使用该表。表格仅用于表格数据,不应用于布局目的。特别是您在header@Pete,它不是一封电子邮件。它只是HTML,实际上我使用了表格或嵌套表格,因为只是为了重复打印。
.class name or #id name {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
}