3aroot css

Solutions on MaxInterview for 3aroot css by the best coders in the world

showing results for - " 3aroot css"
Miguel Ángel
29 Nov 2020
1/*In HTML4, this is always the <html> element, since it is the highest-level
2ancestor of all other elements on the page. So, :root is identical to using the
3html as a selector, except that it has a higher specificity.
4This means that, in the following example, the styles specified using :root
5will override those specified using the html selector, even if the latter
6comes next in the style sheet.
7In document formats other than HTML, such as SVG and XML, 
8the :root pseudo-class can refer to another higher-level ancestor.*/
9
10:root {
11    /* style the root element */
12}
13
14html {
15    /* style the root element */
16}
17                
Maria
02 Mar 2018
1/* Selects the root element of the document:
2   <html> in the case of HTML
3The :root CSS pseudo-class matches the root element of a tree representing the document. In HTML, 
4
5:root represents the <html> 
6element and is identical to the selector html, except that its specificity is higher.
7
8*/
9:root {
10  background: yellow;
11}