📜  如何在 CSS 中的每个页脚元素后插入分页符?

📅  最后修改于: 2021-08-31 08:00:37             🧑  作者: Mango

CSS用于设计网页,以使其对用户更加美观和有吸引力。

在每个页脚后插入分页符后,它会更好看,并且通过使用 CSS page-break-after属性避免重复。

句法:

.foot {
    page-break-after: always;
}

Page-break-after 提供了更多的属性值:

  • 分页后:自动;
  • 分页后:总是;
  • 分页后:避免;
  • 分页后:左;
  • 分页后:对;
  • 分页后: recto;

示例:要在每个页脚或指定元素后插入分页符,我们使用属性page-break-after: always;

HTML


  

    

  

    

Welcome To GFG

       

        GeeksforGeeks is my favorite site where         I can gain a lot of knowledge and can         also share my knowledge what I have         gained while learning. We can add more         paragraphs for content. This is just an         example to tell how to create a story         book like effect. More paragraphs,         content just for showing its best effect.         Some more paragraphs needed. Just some         more. Now you can see it.     

          


输出:

我们在每个页脚后插入了一个分页符,以吸引读者阅读网页上的内容。