:root
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2015ë 7ì.
CSS :root ìì¬ í´ëì¤ë 문ì í¸ë¦¬ì ë£¨í¸ ìì를 ì íí©ëë¤ HTMLì ë£¨í¸ ììë <html> ììì´ë¯ë¡, :rootì ëª
ìëê° ë ëë¤ë ì ì ì ì¸íë©´ html ì íìì ëê°ìµëë¤.
css
/* 문ìì ë£¨í¸ ìì ì í
HTMLììë <html> */
:root {
background: yellow;
}
구문
Error: could not find syntax for this itemìì
>ì ì CSS ë³ì ì ì¸í기
:rootë ì ì CSS ë³ì ì ì¸ì ì ì©íê² ì¬ì©í ì ììµëë¤.
css
:root {
--main-color: hotpink;
--pane-padding: 5px 42px;
}
ëª ì¸
| Specification |
|---|
| Selectors Level 4 > # root-pseudo > |