CSS :root Pseudo-class
- Pagina precedente :right
- Pagina successiva :target
- Torna alla pagina superiore Manuale di riferimento dei pseudo-classe CSS
Definition and Usage
CSS :root
Pseudo-classes are used to match the root element of the document.
In HTML, the root element is always <html> element.
Example
Set the background color and padding for the root element of the document:
:root { background-color: red; padding: 30px; {}
CSS Syntax
:root { css declarations; {}
Technical Details
Version: | CSS3 |
---|
Browser Support
The numbers in the table specify the first browser version to fully support this pseudo-class.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
1 | 12 | 1 | 1 | 9.6 |
- Pagina precedente :right
- Pagina successiva :target
- Torna alla pagina superiore Manuale di riferimento dei pseudo-classe CSS