我的代碼的HTML這樣的:如何在pdf中不顯示頁碼= 1? (HMTL CSS)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Print PDF</title>
<style type="text/css">
.footer { position: fixed; left: 0px; right: 0px; height: 50px;text-align: center; }
.footer .pagenum:before { content: counter(page); }
</style>
</head>
<body>
<h1>This is test</h1>
<table class="tg">
<tr>
<th class="tg-3wr7">kolom 1</th>
<th class="tg-3wr7">kolom 2</th>
<th class="tg-3wr7">kolom 3</th>
<th class="tg-3wr7">kolom 4</th>
<th class="tg-3wr7">kolom 5</th>
</tr>
@php ($row = 22)
@for($i=0;$i<$row;$i++)
<tr>
<td class="tg-rv4w">test 1</td>
<td class="tg-rv4w">test 1</td>
<td class="tg-rv4w">test 1</td>
<td class="tg-rv4w">test 1</td>
<td class="tg-rv4w">test 1</td>
</tr>
@endfor
</table>
<div class="footer">
<span class="pagenum"></span>
</div>
</body>
</html>
如果$行= 22,這將只顯示1頁是這樣的:
如果$行= 202,它會像這樣顯示7頁;
當存在多於1頁,第一頁不顯示頁碼。
但是,當只有1頁,第一頁顯示的頁碼
我要的是:
我要消失的頁面數量時,只有1頁
哪有我做它?
讓我們看看你的鱈魚e出口到pdf –