slideDown():通过使用滑动效果,显示被选元素,如果元素已隐藏的话。
slideUp():通过使用滑动效果,隐藏被选元素,如果元素已显示出来的话。
children():返回被选元素的所有直接子元素。
<head>
<style>
*{
margin:0;
padding:0;
}
.nav{
list-style:none;
width:300px;
margin:100px auto;
}
.nav>li{
line-height:35px;
border-top:1px solid #ccc;
text-indent:2em;//文本块中首行文本的缩进
position:relative;
}
.nav>li:last-child{
border-bottom:1px solid #ccc;
border-bottom-left-radius:10px;
border-bottom-right-radius:10px;
}
.nav>li:first-