麻煩大神看看 為什么橙色的li有時(shí)候會(huì)擴(kuò)不開(kāi) 移到別的li上 它還會(huì)一閃一閃的 謝謝<!DOCTYPE?html>
<html>
<head>
<meta?charset="UTF-8">
<title></title>
<style>
*{
margin:?0;
padding:?0;
}
ul{
list-style:?none;
}
#box{
width:1200px;
height:400px;
margin:100px?auto;
border:1px?solid?orangered;
}
#box?ul{
width:100%;
height:100%;
overflow:?hidden;
}
#box?ul?li{
float:?left;
width:240px;
height:100%;
}
li:nth-of-type(1){
background:red;
}
li:nth-of-type(2){
background:darkgoldenrod;
}
li:nth-of-type(3){
background:darkred;
}
li:nth-of-type(4){
background:indianred;
}
li:nth-of-type(5){
background:darkorange;
}
</style>
</head>
<body>
<div?id="box">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<script?src="jquery-1.2.6.min.js"></script>
<script>
$(function(){
//給所有的li注冊(cè)經(jīng)過(guò)事件
$('#box?li').mouseover(function(){
$(this).stop().animate({width:800}).siblings().stop().animate({width:100});
console.log($(this));
});
$('#box').mouseout(function(){
$('#box?li').stop().animate({width:240});
});
});
</script>
</body>
</html>
手風(fēng)琴導(dǎo)航欄案例
慕粉2339245216
2017-06-23 18:17:26