程序中您將可以看到這些屬性的設定:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div>This is the first div.</div>
<div STYLE="page-break-before:always">This is the second div.</div>
<div STYLE="page-break-after:always">This is the third div.</div>
<div>This is the fourth div.</div>
<div STYLE="page-break-before:right">This is the fifth div.</div>
<div STYLE="page-break-after:right">This is the sixth div.</div>
<div>This is the last div.</div>
</body>
</html>
可用值
值 | 描述 |
---|---|
auto | Insert a page break after the element if necessary 假如需要在對象之後插入頁分割符 |
always | Insert a page break after the element 始終在對象之後插入頁分割符 |
avoid | Avoid inserting a page break after the element 避免在對象後面插入頁分割符 |
left | Insert page breaks after the element until it reaches a blank left page 在對象後面插入頁分割符直到它到達一個空白的左頁邊 |
right | Insert page breaks after the element until it reaches a blank right page 在對象後面插入頁分割符直到它到達一個空白的右頁邊 |
轉載地址:http://blog.163.com/fan_yishan/blog/static/4769221320091043619358/