欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery+CSS實現(xiàn)菜單滑動伸展收縮(仿淘寶)

 更新時間:2013年03月22日 16:08:16   作者:  
淘寶網(wǎng)上的菜單滑動伸展收縮想必大家不會很陌生吧,接下來本文也使用jquery+css實現(xiàn)一個,代碼很簡潔功能很使用,感興趣的各位可以不要錯過了哈

功能很實用,代碼非常的簡單

效果1.


效果2.


樣式代碼如下:

復(fù)制代碼 代碼如下:

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,br,pre,form,fieldset,input,textarea,p,blockquote,th,td{
margin:0;
padding:0
}
span{
color:#FF2B13
}
a{
text-decoration:none;
color:#515050
}
a:hover{
text-decoration:underline;
color:red
}
.box_all{
overflow:hidden;
width:350px;
font-family:"微軟雅黑";
font-size:14px;
border:1px solid #EEEEEE;
border-top:2px solid #F57A04;
padding:0 0 10px 0;
margin:0 auto
}
.box{
padding-left:45px;
padding-top:5px
}
.box li{
line-height:20px;
margin-right:30px;
width:120px;
text-align:left;
float:left;
list-style-type:none
}
.boxdown{
cursor:pointer;
border:1px solid #EEEEEE;
width:60px;
height:14px;
background:#FFFFFF url(../images/down.png) no-repeat 20px;
margin-left:150px;
margin-top:-2px;
border-top:none;
margin:0 auto
}
.up{
cursor:pointer;
border:1px solid #EEEEEE;
width:60px;
height:14px;
background:#FFFFFF url(../images/up.png) no-repeat 20px;
margin-left:150px;
margin-top:-2px;
border-top:none;
margin:0 auto
}

js主要代碼如下:
復(fù)制代碼 代碼如下:

$(document).ready(function(){
var a =$(".box ul li:gt(3):not(:last)");
a.hide();
$(".boxdown").click(function(){
if(a.is(':visible')){
a.slideUp('fast');
$(this).removeClass('up');
}else{
a.slideDown('fast').show();
$(this).addClass('up');
}
});
});

相關(guān)文章

最新評論