Home >Web Front-end >CSS Tutorial >Orphan CSS properties

Orphan CSS properties

WBOY
WBOYforward
2023-09-25 21:05:021364browse

孤儿 CSS 属性

In typography terminology, orphans are paragraph lines that remain at the bottom of the page due to page breaks, while windows are those lines that remain at the top of the page after a page break. Generally speaking, printed pages with single lines of text stuck at the top or bottom don't look attractive. Most printers try to keep at least two or more lines of text at the top or bottom of each page.

  • orphans property specifies the minimum number of lines that must remain in a paragraph at the bottom of the page.
  • widow's Property specifies the minimum number of lines that a paragraph must remain at the top

The following example creates 4 lines at the bottom and 3 lines at the top of each page -

<style>
   <!--
      @page {
         orphans:4;
         widows:2;
      }
   -->
</style>

The above is the detailed content of Orphan CSS properties. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete
Previous article:Pause before CSS propertyNext article:Pause before CSS property