Orphan CSS properties

WBOY
Release: 2023-09-25 21:05:02
forward
1325 people have browsed it

孤儿 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>
Copy after login

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

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template