1

我可以看到这可能与 css 的唯一方法是以某种方式使用 :not 选择器,但我无法弄清楚。下面的注释说明了鼠标悬停时应该处于活动状态的悬停状态。

<div class='node'> // node is activated
  <div class='node'></div> // node is activated but parent is de-activated
  <div class='node'> // node and children are activated but parent is de-activated
    <div class='node'>
      <div class='node'></div>
    </div>
  </div>
</div>

Plunkr:

http://plnkr.co/edit/tGNAAPJ9vKedvy3yjmQk

4

0 回答 0