Home >Web Front-end >CSS Tutorial >CSS @page rules

CSS @page rules

PHPz
PHPzforward
2023-08-30 09:05:231700browse

CSS @page规则

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!

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