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

還是的多練,不然忘的很快

オリジナル 2018-11-21 15:53:43 220
サマリー:<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>三級(jí)下拉菜單</title> <script type="text/javascript" src="jquery-3.3.1
<!DOCTYPE html>
<html>
<head>
 <meta charset="utf-8">
 <title>三級(jí)下拉菜單</title>
 <script type="text/javascript" src="jquery-3.3.1.min.js"></script>
 <style type="text/css">
 *{margin: 0px;padding: 0px;}
 .menu { width:600px;height: 35px;margin: 0px auto;background: #000; margin-top: 20px;color: #fff; border:1px solid #ccc;border-radius: 5px; }
    ul{ list-style: none;}
    ul li {width: 100px;height: 35px;line-height: 35px;text-align: center;float: left;border-right: 1px solid #ccc;cursor: pointer;margin: 0px auto; }
    .twobox li {width: 100px;height: 30px;line-height: 30px;background: #2D2D2D;color: #A9A9A9; font-size: 14px;position: relative;border:0px;}
    .twobox li:hover {background: #000;color: #fff;}
    .three {position: absolute; top: 0px;left: 100px;}
    .three li {width: 99px;height: 30px;line-height: 30px;border: 0px;}
 </style>
 <script type="text/javascript">
        //改變標(biāo)簽的背景顏色的函數(shù)
        function changeColor(tag) {
           var len=document.getElementsByTagName(tag).length
           for(var i=0;i<len;i++){
            document.getElementsByTagName(tag)[i].style.backgroundColor='rgb('+Math.floor(Math.random()*256)+','+Math.floor(Math.random()*256)+','+Math.floor(Math.random()*256)+')'
           }
        }
  $(function(){
    //隱藏二級(jí)與三級(jí)下拉菜單
     $('.twobox').hide()
     $('.three').hide()
    //當(dāng)鼠標(biāo)移動(dòng)到包含二級(jí)菜單的一級(jí)菜單時(shí)顯示當(dāng)前二級(jí)菜單
           $('.one li').mouseover(function(){
            $(this).find('.twobox').slideDown(500)
           })
    //當(dāng)鼠標(biāo)移出包含二級(jí)菜單的一級(jí)菜單時(shí)隱藏當(dāng)前二級(jí)菜單
           $('.one li').mouseleave(function(){
            $(this).find('.twobox').slideUp(500)
            })
    //當(dāng)鼠標(biāo)移動(dòng)到包含三級(jí)菜單的二級(jí)菜單時(shí)顯示當(dāng)前三級(jí)菜單
            $('.two').mouseover(function(){
            $(this).find('.three').slideDown(500)
           })
    //當(dāng)鼠標(biāo)移出包含三級(jí)菜單的二級(jí)菜單時(shí)隱藏當(dāng)前三級(jí)菜單
    $('.two').mouseleave(function(){
            $(this).find('.three').slideUp(500)
            })
             //調(diào)用函數(shù)獲取隨機(jī)顏色
            changeColor('li')
            //當(dāng)鼠標(biāo)在上面是
           $('li').mouseover(function(){
            $bg=$(this).css('backgroundColor')
            $(this).css('box-shadow','0px 0px 20px '+$bg)
            $(this).css('border-radius','20px ')
           })
           //當(dāng)鼠標(biāo)離開(kāi)的時(shí)候
            $('li').mouseleave(function(){
            $(this).css('box-shadow','none')
            $(this).css('border-radius','0px')
           })
    
  })
  
 </script>
</head>
<body>
  <div class="menu">
            <ul class="one"><!-- 一級(jí)下拉菜單 one -->
                <li>首 頁(yè)
                </li>
                <li>商品分類
                    <ul class="twobox"><!-- 二級(jí)下拉菜單 twobox-->
                        <li class="two">男人
                         <ul class="three"><!--三級(jí)下拉菜單 three-->
                                <li>外套</li>
                                <li>情侶裝</li>
                                <li>夾克</li>
                                <li>毛衣</li>
                            </ul>  
                        </li>
                        <li class="two">箱包
                            <ul class="three"><!--三級(jí)下拉菜單 three-->
                                <li>產(chǎn)品1.1</li>
                                <li>產(chǎn)品1.2</li>
                                <li>產(chǎn)品1.3</li>
                                <li>產(chǎn)品1.4</li>
                            </ul>   
                        </li>
                        <li class="two">數(shù)碼
                           <ul class="three">
                                <li>電腦</li>
                                <li>手機(jī)</li>
                                <li>相機(jī)</li>
                                <li>手表</li>
                            </ul>  
                        </li>
                        <li>女人</li>
                    </ul>
                </li>
                <li>我的淘寶
                    <ul class="twobox">
                        <li>以買到的寶貝</li>
                        <li class="two">我的足跡
                             
                        </li>
                        <li>我的上新</li>
                        <li>淘寶達(dá)人</li>
                    </ul>
                </li>
                <li>購(gòu)物車</li>
                <li>收藏夾</li>
            </ul>
        </div>  
</body>
</html>


添削の先生:韋小寶添削時(shí)間:2018-11-21 15:56:09
先生のまとめ:寫(xiě)的很不錯(cuò)!下次還記得加上代碼高亮哦!還有下次作業(yè)也得有總結(jié)哦!

手記を発表する

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