CMS*_*CMS 8

该父>子选择器将只查找直接子元素,而ancestor descendant将寻找任何后代元素.

例如,使用以下标记:

<div class="foo">
  <div>
    <div class="bar"></div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

$('.foo > .bar')将找不到该.bar元素,同时$('.foo .bar')确实找到它因为.foo不是直接的孩子.bar,而是它的后代.