现在让我们看看,不确定我是否有100%的逻辑。
这就是我正在使用的(bootply demo here)
<ul>
<li class="row">
<span class="category col-sm-2 highlight">Architecture</span>
<span class="title col-sm-4"><a href="#">Hello world!</a></span>
<span class="publication col-sm-2 hidden-xs">Magazine</span>
<span class="year col-sm-2 hidden-xs">2007</span>
</li>
<li class="row">
<span class="category col-sm-2 invisible">Architecture</span>
<span class="title col-sm-4"><a href="#">Keep them coming</a></span>
<span class="publication col-sm-2 hidden-xs">Magazine</span>
<span class="year col-sm-2 hidden-xs">2007</span>
</li>
<li class="row">
<span class="category col-sm-2 invisible">Architecture</span>
<span class="title col-sm-4"><a href="#">The other posts</a></span>
<span class="publication col-sm-2 hidden-xs">Magazine</span>
<span class="year col-sm-2 hidden-xs">2007</span>
</li>
<li class="row">
<span class="category col-sm-2">Cities</span>
<span class="title col-sm-4"><a href="#">Tezt</a></span>
<span class="publication col-sm-2 hidden-xs">Magazine</span>
<span class="year col-sm-2 hidden-xs">2007</span>
</li>
</ul>
这个想法是,当将一个元素悬停在span.title
中时,发布和年份中文本的颜色会发生变化。我也正在寻找一种方法来改变同类span.category
的第一种颜色(即悬停“其他帖子”应改变第一span.category
中.row
的颜色)。这是用纯CSS实现的吗?
答案 0 :(得分:6)