我想表示嵌套集(http://en.wikipedia.org/wiki/File:NestedSetModel.svg)
具有以下html结构
<div class="circle">
<div class="nodeText">Clothing</div>
<span class="lft">1</span>
<span class="rgt">22</span>
<div class="circle" id="node2">
<div class="nodeText">Men's</div>
<span class="lft">2</span>
<span class="rgt">9</span>
</div>
<div class="circle" id="node3" >
<div class="nodeText" >Women's</div>
<span class="lft">10</span>
<span class="rgt">21</span>
</div>
</div>
和CSS(至少我认为对这个问题很重要)
.circle {
background-color: blue;
margin:10px;
padding: 10px;
border-radius: 10%;
position: relative;
text-align: center;
float: left;
z-index: inherit;
}
.circle:HOVER{
background-color: red;
}
我想要的行为是,当我将鼠标悬停在具有“圆圈”类的 div 上(在本例中为“男士”或“女士”)时,我会更改这些的背景颜色,但不会更改父 div '服装'