将鼠标悬停在包含子div的div上时需要建议吗?

时间:2013-10-30 11:34:14

标签: css html

<div class="one">
  <div class="presetHolder"><h3>Energy Solutions</h3>
    <div class="imageHolder">
      <div class="image"> <img src="/gogivers/assets/Image/energy1.jpg" alt="" height="70" width="70"> </div>
      <div class="image"> <img src="/gogivers/assets/Image/energy2.jpg" alt="" height="70" width="70"> </div>
      <div class="image"> <img src="/gogivers/assets/Image/energy3.jpg" alt="" height="70" width="70"> </div>
      <div class="image"> <img src="/gogivers/assets/Image/energy4.jpg" alt="" height="70" width="70"> </div>
      <div class="image"> <img src="/gogivers/assets/Image/energy5.jpg" alt="" height="70" width="70"> </div>
      <div class="image"> <img src="/gogivers/assets/Image/energy6.jpg" alt="" height="70" width="70"> </div>
      <div class="image"> <img src="/gogivers/assets/Image/energy7.jpg" alt="" height="70" width="70"> </div>
      <div class="image"> <img src="/gogivers/assets/Image/energy8.jpg" alt="" height="70" width="70"> </div>
    </div>
  </div>
</div>

我试图将悬停效果放在div“one”上,但悬停效果只会突出显示presetHolder div或imageHolder div。

有人可以建议我需要这样做吗?

1 个答案:

答案 0 :(得分:1)

.one:hover .presetHolder {
your hovered styles here
}

.one:hover .imageHolder {
your hovered styles here
}