CSS :루트 선택기를 사용하여 문서의 루트 요소에 스타일을 지정합니다.
예시
다음 코드를 실행하여 :root 선택기
를 구현할 수 있습니다.<!DOCTYPE html>
<html>
<head>
<style>
:root {
background: blue;
color: white;
}
</style>
</head>
<body>
<h1>Heading</h1>
<p>This is demo text.</p>
</body>
</html>