亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

頁(yè)面中常用平級(jí)下拉菜單實(shí)現(xiàn)

オリジナル 2018-12-10 10:34:15 193
サマリー:<!DOCTYPE html> <html> <head>   <meta charset="UTF-8">   <title>頁(yè)面中常用平級(jí)下拉菜單(手風(fēng)琴)</title>   <link rel="
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>頁(yè)面中常用平級(jí)下拉菜單(手風(fēng)琴)</title>
  <link rel="shortcut icon" href="static/images/logo.png" type="image/x-icon">
  <link rel="stylesheet" type="text/css" href="static/css/style.css">
  <script type="text/javascript" src="static/js/jquery.js"></script>
  <script type="text/javascript">
      $(function(){
       /* $('.two').css('display','none')
        var one=$('.one');
        //console.log(one);
        var two=$('.two');
        //console.log(two);
        $('.one').each(function(i){
            $(this).click(function(){
              if($(two[i]).css('display')=='none'){
                $(two[i]).slideDown(400)
              }else{
                $(two[i]).slideUp(400)
              }
            })
        })
*/
       $('.two').hide()
        $('.one').click(function(){
          //console.log ($(this).next().css('display')=='none');
          if($(this).next().css('display')=='none'){
           $(this).next().slideDown(1000);
          }else{
            $(this).next().slideUp(1000);
          }
        })
      })
  </script>
</head>
<body>
  <div>
    <div>
      <div>
        <strong>個(gè)人中心</strong>  
      </div>
      <div>
        <div><a href="">我的信息</a></div>
        <div><a href="">系統(tǒng)通知</a></div>
        <div><a href="">短信息</a></div>
      </div>
    </div>
    <div>
      <div>
        <strong>課程中心</strong>  
      </div>
      <div>
        <div><a href="">我的課程</a></div>
        <div><a href="">課程資源</a></div>
        <div><a href="">班級(jí)統(tǒng)計(jì)</a></div>
        <div><a href="">課程題庫(kù)</a></div>
      </div>
    </div>
    <div>
      <div>
        <strong>校內(nèi)討論</strong>  
      </div>
      <div>
        <div><a href="">我的帖子</a></div>
        <div><a href="">新回復(fù)</a></div>
        <div><a href="">課程模塊</a></div>
        <div><a href="">問(wèn)答中心</a></div>
      </div>
    </div>
    <div>
      <div>
        <strong>資源中心</strong>  
      </div>
      <div>
        <div><a href="">教學(xué)資源</a></div>
        <div><a href="">教學(xué)經(jīng)歷</a></div>
      </div>
    </div>
  </div>
</body>
</html>
*{
margin: 0px;
padding: 0px; 
font-size: 14px;
font-family: "微軟雅黑"
}
a{
text-decoration: none;
color: #36b2f5;
}
.nav{
width: 250px;
margin:70px auto;
border-top: 3px solid #36b2f5;
border-bottom: 2px solid #36b2f5;
}
.nav .one{
height: 40px;
line-height: 40px;
text-align: center;
border-left: 1px solid #36b2f5;
border-right: 1px solid #36b2f5;
border-bottom: 1px solid #36b2f5;
}
.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;
}

總結(jié):通過(guò)這個(gè)案例,對(duì)于css中的一些細(xì)節(jié)理解更加清楚了,更加鞏固了jquery的使用。平級(jí)下拉菜單.png

添削の先生:滅絕師太添削時(shí)間:2018-12-10 10:55:15
先生のまとめ:完成的不錯(cuò),這都是頁(yè)面布局中常見(jiàn)的jq樣式,要好好掌握舉一反三

手記を発表する

人気のある見(jiàn)出し語(yǔ)