相关疑难解决方法(0)

仅选择第一级元素,而不选择具有相同元素名称的子元素

我如何选择第一级.block而不选择任何一个孩子?

$('.block:not("Children of this here")') < -

<div class="block"> <!-- this -->
  <div class="block"> <!-- not this -->
    <div class="block"> <!-- not this -->

    </div>
  </div>
</div>

<div class="block"> <!-- and this -->
  <div class="block"> <!-- not this -->
    <div class="block"> <!-- not this -->

    </div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

css jquery

6
推荐指数
1
解决办法
6056
查看次数

标签 统计

css ×1

jquery ×1