Home > Web Front-end > CSS Tutorial > What are page boxes in CSS?

What are page boxes in CSS?

WBOY
Release: 2023-08-29 23:01:02
forward
1320 people have browsed it

What are page boxes in CSS?

You can specify the size, orientation, margins, etc. of the page box in the @page rule. The size of the page box is set by the "size" attribute. The size of the page area is the size of the page box minus the margin area.

For example, the following @page rule sets the page box dimensions to 8.5 × 11 inches and creates 'All margins between the page box edges and the page area are 2 cm -

<style>
   <!--
      @page { size:8.5in 11in; margin: 2cm }
   -->
</style>
Copy after login

You can Use the margin, margin-top, margin-bottom, margin-left, and margin-right properties in the @page rule to set the page's margins.

Finally, use the marks attribute in the @page rule to create crop marks and registration marks outside the page box on the target paper. By default, no marks are printed. You can use either or both of the crop and cross keywords to create crop marks and registration marks, respectively, on the target printed page.

The above is the detailed content of What are page boxes in CSS?. 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