CSS :first pseudo-class
- Page précédente :enabled
- Page suivante :first-child
- Retour au niveau supérieur Manuel de pseudo-classes CSS
Definition and usage
CSS :first
Pseudo-classes are used to select and set the style of the first page of the printed document.
Tip::first
Pseudo-classes are used with @page rules.
Note:The following properties can be used with :first
Used together:
- Margin properties
- orphans
- widows
- Pagination properties
Example
Select the first page to print:
@page :first { margin-left: 40%; margin-top: 50%; }
CSS syntax
@page :first { css declarations; }
Technical details
Version: | CSS3 |
---|
Browser support
The numbers in the table indicate the first browser version to fully support this pseudo-class.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
18 | 12 | 116 | 6 | 9.2 |
Related pages
Référence :CSS :left pseudo-class
Référence :Pseudo-classe :right CSS
- Page précédente :enabled
- Page suivante :first-child
- Retour au niveau supérieur Manuel de pseudo-classes CSS