小编Dav*_*ung的帖子

将鼠标悬停在其父LI上时如何触发链接悬停状态.jQuery的

当我将鼠标悬停在其父li上时,我正试图在文本链接上触发悬停状态.这是否可能在CSS中;其次,我错过了.children可以解决这个问题.这是HTML:

<li class="video-1">                                    
  <a href="#"><img src="images/csi-1.gif" alt="csi-1" width="140" height="80" /></a>
  <h3 class="show-title"><a href="#">Show TItle</a></h3>
  <h3 class="ep-name"><a href="#">Episode Name</a></h3>
  <h4 class="season-info">Season 4 | Ep 10<span class="more"><a href="#">See More</a></span></h4>

</li>
Run Code Online (Sandbox Code Playgroud)

和JS:

$(".more").hide();

$(".video-1").hover(function () {
$(".video-1:hover h3.show-title a").css('color', '#006699'),function() {
    $(this).css("color", "#fff");
             }      
   $(".more").toggle();   

});
Run Code Online (Sandbox Code Playgroud)

css jquery css3

6
推荐指数
1
解决办法
5645
查看次数

标签 统计

css ×1

css3 ×1

jquery ×1