第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>網(wǎng)頁定位導(dǎo)航效果擴(kuò)展案例</title>
<style>
        * { margin: 0; padding: 0; }

        body { font-size: 12px; line-height: 1.7; background-color: #888;}

        li { list-style: none; }
        #content { width: 1000px; margin: 0 auto; padding-top: 100px;padding-bottom: 300px; text-align: center;}      
   /*請(qǐng)補(bǔ)充此處代碼,讓右側(cè)廣告正確顯示*/
        .item{
           width: 100%;
           height: 525px;
           margin: 0 auto;
           margin-bottom: 5px;
           position: relative;
        }
        #content .item img {
            position: absolute;
        }
        #content #item1 img{
        	top:100px;
        	right: 0px; 
        } 
        #content #item3 img{
        	top:110px;
        	right:200px; 
        }
        #content #item4 img,#content #item5 img{
        	top:20px;
        	right:250px; 
        }
        #content #item1 { background: url("images/bj1.jpg") no-repeat center top; }
        #content #item2 { background: url("images/bj2.jpg") no-repeat center top; }

        #content #item3 { background: url("images/bj3.jpg") no-repeat center top; }

        #content #item4 { background: url("images/bj4.jpg") no-repeat center top; }

        #content #item5 { background: url("images/bj.jpg") no-repeat center top; }

      
  /*請(qǐng)補(bǔ)充此處代碼,讓導(dǎo)航菜單在左側(cè)絕對(duì)定位顯示*/
       #menu{
       	position: fixed;
       	top:100px;
       	right: 50%;
       	margin-right: 300px;
       	z-index: 1;
       }


        #menu h1 {
            color: #fff;
            font-size: 14px;
            text-align: center;
            background: #ee1111;
            line-height: 30px;
        }

        #menu ul li a {
            display: block;
            margin: 5px 0;
            font-size: 12px;
            color: #ccc;
            width: 160px;
            padding: 10px 20px;
            text-decoration: none;
            text-align: left;
            border-bottom: 1px dashed #999;
        }

        #menu ul li a strong {
            color: #f1f1f1;
        }

        #menu ul li a:hover,
        #menu ul li a.current {
            color: #fff;
            background: #666;
        }

        /*ie6 hack*/
        * html, * html body {
            background-image: url(about:blank);
            background-attachment: fixed;
        }

        * html #menu {
            /*position: fixed;*/
            position: absolute;
            top: expression(((e=document.documentElement.scrollTop)?e:document.body.scrollTop)+100+'px');
        }

</style>
<script src="http://libs.baidu.com/jquery/1.10.2/jquery.js"></script>
<script>
        $(document).ready(function () {
            $(window).scroll(function () {
                var top = $(document).scrollTop();
                var menu = $("#menu");
                var items = $("#content").find(".item");
                var currentId="";
// 讓導(dǎo)航菜單實(shí)現(xiàn)在滾動(dòng)條滾動(dòng)的時(shí)候自動(dòng)設(shè)置焦點(diǎn)
                items.each(function(){
                	var itemTop=$(this).offset().top;
                	if(top>itemTop-150){
                     currentId="#"+$(this).attr("id");
                	}else{
                		return false;
                	}
                });
                if(currentId&&!menu.find("[href="+currentId+"]").attr("class")){
                	menu.find(".current").removeClass('current');
                    menu.find("[href="+currentId+"]").addClass('current');
                }
 
 
            });

        });
</script>
</head>
<body>
<div id="menu">
<h1>正在首發(fā)</h1>
<ul>
<li><a href="#item1" class="current"><strong>2014.04.09</strong><br>施華蔻0元贏Smart</a></li>
<li><a href="#item2"><strong>2014.04.05</strong><br>alienware機(jī)皇限量搶</a></li>
<li><a href="#item3"><strong>2014.04.04</strong><br>聯(lián)想Miix2 3G平板電腦</a></li>
<li><a href="#item4"><strong>2014.04.03</strong><br>御爵廚房垃圾處理器</a></li>
<li><a href="#item5"><strong>2014.04.01</strong><br>中興天機(jī)GRAND S II</a></li>
</ul>
</div>
<div id="content">
	<div id="item1" class="item">
	     <img src="images/wash.jpg"/>
	</div>
	<div id="item2" class="item">
		<img src="images/girl.jpg"/>
	</div>
	<div id="item3" class="item">
		<img src="images/pc.jpg"/>
	</div>
	<div id="item4" class="item">
		<img src="images/friut.jpg"/>
	</div>
	<div id="item5" class="item">
		<img src="images/phone.jpg"/>
	</div>
</div>

</body>

</html>


正在回答

0 回答

舉報(bào)

0/150
提交
取消
網(wǎng)頁定位導(dǎo)航特效
  • 參與學(xué)習(xí)       71394    人
  • 解答問題       504    個(gè)

本課程講解網(wǎng)頁定位導(dǎo)航特效,仿天貓版地狗購物網(wǎng),你值得擁有

進(jìn)入課程
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)