abstract:/* 手琴式 導航欄 *//* * { margin: 0px; padding: 0px; font-size: 14px; font-family: "微軟雅黑";&n
/* 手琴式 導航欄 */
/* * {
margin: 0px;
padding: 0px;
font-size: 14px;
font-family: "微軟雅黑";
}
a {
text-decoration: none;
color: #36b2f5;
}
.nav {
width: 250px;
margin: 70px auto;
border-top: 4px solid #36b2f5;
border-bottom: 3px solid #36b2f5;
}
.nav .one {
border-bottom: 1px solid #36b2f5;
border-left: 1px solid #36b2f5;
border-right: 1px solid #36b2f5;
height: 40px;
line-height: 40px;
text-align: center;
}
.two {
width: 248px;
border-left: 1px solid #36b2f5;
border-right: 1px solid #36b2f5;
}
.two div {
height: 35px;
line-height: 35px;
text-align: center;
border-bottom: 1px dotted #36b2f5;
cursor: cell;
} */
<!--手琴式,下拉導航欄 -->
<!-- <div class="nav">
<div class="parent">
<div class="one">
<strong>個人中心</strong>
</div>
<div class="two">
<div><a href="">我的信息</a></div>
<div><a href="">系統(tǒng)通知</a></div>
<div><a href="">短信息</a></div>
</div>
</div>
<div class="parent">
<div class="one">
<strong>課程中心</strong>
</div>
<div class="two">
<div> <a href="#">我的課程</a></div>
<div> <a href="#">課程資源</a></div>
<div> <a href="#">班級統(tǒng)計</a></div>
<div> <a href="#">課程題庫</a></div>
</div>
</div>
<div class="parent">
<div class="one">
<strong>校內(nèi)討論</strong>
</div>
<div class="two">
<div> <a href="#">我的帖子</a></div>
<div> <a href="#">新回復</a></div>
<div> <a href="#">課程板塊</a></div>
<div> <a href="#">問答中心</a></div>
</div>
</div>
<div class="parent">
<div class="one">
<strong>資源中心</strong>
</div>
<div class="two">
<div> <a href="#">教學資源</a></div>
<div> <a href="#">教學經(jīng)歷</a></div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
var one = $('.one')
var two = $('.two')
$('.two').css('display', 'none')
$('.one').each(function (i) {
$(this).click(function () {
if ($(two[i]).css('display') == 'none') {
$(two[i]).slideDown(400)
} else {
$(two[i]).slideUp(400)
}
})
})
})
</script> -->
Correcting teacher:天蓬老師Correction time:2019-08-07 13:28:39
Teacher's summary:這就是一個簡單的事件而已, 并無特別之處, 想一下,如何讓你用原生語法 , 可以做出來嗎?