0

Any difference between ' :root ' and ' * ' ? Please I need an explanation for each :)

:root{color: red;} *{color: red;}

3rd Feb 2019, 11:50 PM
Nael Sharabi
Nael Sharabi - avatar
1 Réponse
+ 3
:root is the root of the HTML document. Not the html tag but higher than that. Sort of like the document itself. * is the universal selector. It selects all elements, including :root.
4th Feb 2019, 5:02 AM
Rowsej
Rowsej - avatar