Sử dụng bộ chọn CSS:root để tạo kiểu cho phần tử gốc của tài liệu.
Ví dụ
Bạn có thể thử chạy mã sau để triển khai:root Selector
<!DOCTYPE html>
<html>
<head>
<style>
:root {
background: blue;
color: white;
}
</style>
</head>
<body>
<h1>Heading</h1>
<p>This is demo text.</p>
</body>
</html>