1 回答
TA贡献1871条经验 获得超8个赞
<style>
.btn-slide-right li {width:200px;height:50px;border:1px solid red;margin-top:10px;}
</style>
<div class = "btn-slide-hover" style = "position:fixed;top:300px; right:0; width:20px;height:200px;
background-color:#dcdfdf;border-right:none;"></div>
<div class = "btn-slide-right" style = "position:fixed;right:0; display:none; border:1px solid red;width:100px;height:200px;z-index:9999;top:300px;">
<ul class = "ul">
<li></li>
<li></li>
<li></li>
</ul>
</div>
<script>
$(".btn-slide-hover").hover(function(){
$(".btn-slide-right").show(500);
$(this).hide();
});
$(".btn-slide-right").mouseleave(function(){
$(".btn-slide-hover").show(500);
$(this).hide();
})
</script>
把mouseout换成mouseleave就好了(虽然我也是新手,但我同事要是像你那样写代码,我会想掐死他)
添加回答
举报