CSS Dot Notation Naming Convention

后端 未结 6 1627
余生分开走
余生分开走 2020-12-31 13:48

I am getting started with learning CSS.

While looking through the tutorial on w3schools.

I realized some of the example start with

.awesom         


        
6条回答
  •  猫巷女王i
    2020-12-31 14:31

    Here . is class selector. It means apply style to all elements which has class awesome-text-box ie,

    while without dot it is tag name like you mention in second example p Here p is tag:

    Some text

    Similarly p.one apply the style to all p tags which has class one. ie,

    Some text

提交回复
热议问题