![CSS 中设置页面大小的值](https://img.php.cn/upload/article/000/887/227/169296438474361.jpg)
There are four values available for setting the page size -
- auto− The page box will be set to the target worksheet size and direction.
- Lateral− Cover the direction of the target. The page box is the same size as the target, with the longer side horizontal.
- Portrait- Overrides the orientation of the target. The page box is the same size as the target, with the short side horizontal.
- Length- The length value of the "size" attribute creates an absolute page box. If you specify only a length value, both the width and height of the page box are set. Percentage values are not allowed for the 'size' attribute.
In the following example, the outer edge of the page box will be aligned with the target. The percentage value of the Margins property is relative to the target size, so if the target paper size is 21.0 cm × 29.7 cm (i.e. A4), the margins are 2.10 cm and 2.97 cm.
The above is the detailed content of Setting the page size value in CSS. For more information, please follow other related articles on the PHP Chinese website!