Home >Web Front-end >CSS Tutorial >How to use page-break-after:always;?
First, how to use page-break-after:always;? What is the difference between so many parameters?
Second, why does my following code not work (the picture is not centered and the picture is not displayed completely)? How do I control the length and width of that image?
<style type="text/css"> body,ul,li,img{ margin:0; padding:0; } img{ margin:0; padding:0; } ul,li{ list-style-type:none; } .print{ margin:0 auto; width:100%; } .print img{ display:block; height:20mm; width:60mm; } .location{/*库位标签*/ height:50px; } .print .prLn { page-break-after:always; } </style>
<div class="print"> </ul> <?php $inputStart=$_POST['inputStart']; $inputEnd=$_POST['inputEnd']; $labelType=$_POST['labelType']?$_POST['labelType']:""; for($i=intval($inputStart);$i<=intval($inputEnd);$i++){ echo "<li><img src=\"barcode/html/image.php?text=".$labelType.$i."\" height=\"60mm\" width=\"20\"></li>"; echo $i<intval($inputEnd)?"<li class=\"prLn\"></li>":NULL; } ?> </ul> </div>
I have never used this attribute.
Set paging, useful when printing, see print preview
It's OK when previewing, but it changes when it is actually printed. I wasted nearly a hundred printouts and felt sorry for the country
The above is the detailed content of How to use page-break-after:always;?. For more information, please follow other related articles on the PHP Chinese website!