@page{size:8.5in11in; margin:2cm} -->&"/> @page{size:8.5in11in; margin:2cm} -->&">

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

What are page boxes in CSS?

WBOY
WBOYforward
2023-08-29 23:01:021298browse

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>

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete