:left Back
:leftis a CSS pseudo-class selector used to select all the left pages of a printed document.- When printing double-sided documents (such as books), the pages on left and right pages may be different. The
:leftpage selector is used in conjunction with the@pagerule, which selects all pages in a printed document, to select all the left pages of the document.
@page :left {
/** styles for left pages */
}
Note:
- Styles specified in a
:first@pagerule override any styles specified in:leftand:right@pagerules. - According to rules
@page, you can only change some CSS properties:
| categories | items |
|---|---|
| Margin Properties | margin-top, margin-left, margin-right, and margin-bottom |
| Page Break Properties | page-break-after, page-break-before, and page-break-inside |
| Other Properties | orphans and windows |
- All pages are automatically classified by user agents into either the
:leftor:rightpseudo-class. Whether the first page of a document is:leftor:rightdepends on the major writing direction of the root element. For example, the first page of a document with a left-to-right major writing direction would be a:rightpage, and the first page of a document with a right-to-left major writing direction would be a:leftpage.
