2
これは私のコードです。このページを印刷すると、見出しと名前は最初のシートではOKですが、2番目のシートでは見出しが正しく表示されません。 これを行う他の方法はありますか?HTMLとCSSを使用してページを印刷するとき、同じ余白を2ページ目に表示する方法はありますか?
<html>
<head>
<style>
.my-header {
background: #e3dcf9;
height: 40px;
top: 0;
left: 0;
position: fixed;
right: 0;
}
thead { display:table-header-group }
</style>
</head>
<body>
<div class="my-header">This is header</div>
<div style="margin-top:100px;position: relative;">
<table border="1" >
<thead>
<tr>
<th>Number</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<?php
for($i=1;$i<=150;$i++)
{
?>
<tr>
<td><?php echo $i;?></td>
<td>Content</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</body>
</html>
インラインCSSも動作しません。 –