如何在每个打印页面之间留出空间。
这是我的代码:-
$('.printBtn').click(function () {
var printContent = $('#entireForm').html();
var WinPrint = window.open('', '', 'left=0,toolbar=0,scrollbars=0,status=0')
WinPrint.resizeTo(screen.width, screen.height);
WinPrint.document.write('<html><head><title>NorthStarDoc</title>')
WinPrint.document.write('<style type="text/css">')
WinPrint.document.write('body{ font-family: Arial !important;} @page{size:auto; margin:0px 10px;} *{ margin:0px; padding:0px;}p{margin:0px; padding:0px;}')
WinPrint.document.write('</style>')
WinPrint.document.write('<link href="~/Content/content/css/print.css" rel="stylesheet" media="print" />')
WinPrint.document.write('</head><body>')
WinPrint.document.write(printContent);
WinPrint.document.write('</body><html>')
WinPrint.focus();
WinPrint.print();
WinPrint.close();
closePrintSign();
});
*{ margin:0px; padding:0px;}
p{margin:0px; padding:0px;}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
<div class="container" id="entireForm">
<h2>pritn form</h2>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p><p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<p>This is my print content</p>
<a href="#" class="printBtn btn btn-primary">Print</a>
</div>
这不是重复的问题,实际上我发现了类似的问题,但不完全相同。