Home > Article > Web Front-end > CSS @page rules
You can specify the size, direction, margins, etc. of the page box in the @page rule. The dimensions of the page box are 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 a margin of '2cm' on all sides between the page box edge and the page area:
<style> <!-- @page { size:8.5in 11in; margin: 2cm } --> </style>
The above is the detailed content of CSS @page rules. For more information, please follow other related articles on the PHP Chinese website!