pageBreakInside 声明一个元素内部是否应当放置分页符。
</>code
- Object.style.pageBreakInside=auto|avoid
值 | 描述 |
---|---|
auto | 默认。如果必要则在元素内部插入分页符。 |
avoid | 避免在元素内部插入分页符。 |
本例避免在 id 为 p2 的段落中的 page-break:
</>code
- <html>
- <head>
- <script type="text/javascript">
- function setPageBreak()
- {
document.getElementById("p2").style.pageBreakInside="avoid";
- }
- </script>
- </head>
- <body>
- <p>This is a test paragraph.</p>
- <input type="button" onclick="setPageBreak()"
- value="Set page to not break inside the second paragraph" />
- <p id="p2">This is also a test paragraph. We need some
- more text here. This is just filler text.</p>
- </body>
- </html>
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
Powered by 365建站网 RSS地图 HTML地图
copyright © 2013-2024 版权所有 鄂ICP备17013400号