HTML CSS examples for CSS Selector:root
The :root selector selects the document's root element, the html element.
Select HTML element:
<!DOCTYPE html> <html> <head> <style> :root {<!--from w w w . java2s . c o m--> background: #ff0000; } </style> </head> <body> <h1>This is a heading</h1> </body> </html>