开发者

Css class nesting and grouping

开发者 https://www.devze.com 2023-04-08 16:50 出处:网络
What is the difference between #id .A.B x {} #id .A .By { } 开发者_如何学JAVAin CSS file? Both A and B are classes.

What is the difference between

#id .A.B x {  }
#id .A .B  y { }
开发者_如何学JAVA

in CSS file?

Both A and B are classes. x and y are some tags

Does the spacing between .A and .B have any significance?


In the first case, it references an element that has both A and B as classes:

<div class="A B"></div>

The second is an element with class A that has an element with class B nested inside:

<div class="A">
  <div class="B"></div>
</div>
0

精彩评论

暂无评论...
验证码 换一张
取 消