How is the “greater than” or “>” character used in CSS?

后端 未结 4 1615
春和景丽
春和景丽 2020-12-04 17:20

I have seen this character a number of times in CSS files but I have no idea how its used. Can anyone explain it to me and show how they are useful in making a page style ea

4条回答
  •  臣服心动
    2020-12-04 17:37

    p em
    

    will match any that is within a

    . For instance, it would match the following s:

    foo

    Text foo bar

    On the other hand,

    p > em
    

    Will match only s that are immediate children of

    . So it will match:

    Text foo bar

    But not:

    foo

提交回复
热议问题