What is the css / html `root` element?

后端 未结 6 1770
Happy的楠姐
Happy的楠姐 2020-12-30 20:18

I have just recently started using NetBeans IDE (6.9.1) and have used it to add a stylesheet to my site-in-progress.

To my surprise, one element was automatically ad

6条回答
  •  清歌不尽
    2020-12-30 21:03

    The :root element is the element who has no parents, so I guess that the only root element in HTML is the element.. So when you use the :root selector to style, it will style the whole document.

    (I found more information here: http://webdesign.about.com/cs/css/qt/tipcsschild.htm and here: http://www.w3schools.com/cssref/sel_root.asp).

提交回复
热议问题