B.99. size

This property, which can appear only within a @page at-rule (see Section A.1) lets you control the page size and/or orientation as needed.

B.99.1. Value

This property can take a number of constants, or specific page measurements.

Supported constants are:

  • auto

  • landscape

  • portrait

auto tells the browser to use a page size/orientation equal to the printer settings, while landscape and portrait force the browser to rotate the page as necessary to print in the specified orientation on the printer's paper size.

Alternatively, you can specify an exact page size with either one or two CSS length values (separated by spaces). If only one value is specified, it is used as both the width and height; otherwise, the first value is the page width and the second is the page height.

Initial value: auto

B.99.2. Compatibility

CSS Version: 2

Not supported any current browser.

B.99.3. Example

This style rule specifies that the page should be printed in landscape orientation on a Letter-sized (8.5 by 11 inch) page:

@page {
  size: 11in 8.5in;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.85.33