Home > Web Front-end > CSS Tutorial > How to use page-break-after:always;?

How to use page-break-after:always;?

黄舟
Release: 2017-07-08 09:58:03
Original
3321 people have browsed it

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>
Copy after login
<div class="print">
</ul>
        <?php
 $inputStart=$_POST[&#39;inputStart&#39;];
 $inputEnd=$_POST[&#39;inputEnd&#39;];
 $labelType=$_POST[&#39;labelType&#39;]?$_POST[&#39;labelType&#39;]:"";
 
 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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template