[英]How i removed blank space in html page while printing?
我有一個打印此頁面內容的頁面。 我的問題是加載頁面時會出現打印對話框並且底部有空白區域。 如何刪除這個空白? 我試圖給身體min-height:100vh
但它不起作用 . 另請檢查打印 css
@page { /* size: auto; auto is the initial value */ margin: 3.5mm; } @media print{ table { page-break-inside:auto; } tr { page-break-inside:avoid; page-break-after:auto; } thead { display:table-header-group; } tfoot { display:table-footer-group; } }
您必須根據內容長度和寬度更改並檢查以下樣式值。
@page { size: 100mm 50mm } /* output size */
body.receipt .sheet { width: 58mm; height: 50mm } /* sheet size */
@media print { body.receipt { width: 58mm } } /* fix for Chrome */
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.