0
<div class="positions">
<div class="main" style="clear: both;">
<div class="mainC">
<a class="news" href="#"><img src="salad.jpg" width="105" alt="salad"/></a>
</div>
</div>
<div class="foot" style="clear: both;">
<h1 class="news"><a href="#">Salad</a></h1>
</div>
</div>

Is it possible to change the color of the "Salad" link, when the parent "positions" div is rolled over? Thanks in advance for any help.

4

1 回答 1

3

使用Css 伪类:hover

.positions:hover h1.news a
{
  color:red;
}

-- 见示例 --

于 2012-04-10T15:24:15.393 回答