如果达到元素的给定最大高度,请转到打印纸的下一页

时间:2015-10-22 07:25:03

标签: jquery html css

CSS / jQuery是否可以知道某个div是否达到其存储元素的最大容量。如需查看此fiddle。我希望当继续进入下一页时仍然会打印我制作的标题。

HTML

<div>
   <h1> Header 1 </h1>
   <p>If this paragraph reaches the maximum of height of the div the continuation should be on the next page
    If this paragraph reaches the maximum of height of the div the continuation should be on the next page
    If this paragraph reaches the maximum of height of the div the continuation should be on the next page
    If this paragraph reaches the maximum of height of the div the continuation should be on the next page
    If this paragraph reaches the maximum of height of the div the continuation should be on the next page   
    </p>

</div>

CSS

div {
    height: 100px;
    background-color: yellow;
}

0 个答案:

没有答案