久久草情侣vs国产&久久精品国产av一级二级三级&日韩免费黄色视频&精品一区二区三区av天堂&玩弄少妇高潮a片水蜜桃网站&女教师韩国

歡迎來到億搜云建站平臺,全網(wǎng)營銷云系統(tǒng)加盟中心!

海量企業(yè)網(wǎng)站模板 · 任您選擇

美出特色,精出品質(zhì),一切為了企業(yè)更好的營銷

隱藏側(cè)欄
Beta
轉(zhuǎn)載

簡單JS滑動的導(dǎo)航

       導(dǎo)航     2016-02-16     eycms     134     0    

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>無標(biāo)題文檔</title>

<style type="text/css">

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote{margin:0; padding:0;}

body { font:12px "5B8B4F53",san-serif; color:#808080;  padding-top:6px;  }

a { text-decoration:none; color:#808080 }

a:hover { text-decoration:underline; color:#ba2636 }

ul, li { list-style:none; }

#nav{ padding:41px 0 0 0; height:27px;width:542px; overflow:hidden;  float:right; margin-right:17px;position:relative ;}

#nav ul{ height:27px; width:100%;  background: url(i/naVbotBdr.gif) repeat-x 0 100%; }

#nav ul li{ width:67px; height:24px; float:left; padding-right:28px; display:inline; cursor:pointer; overflow:hidden}

#nav a{background:#999;width:100%; height:24px; display:block; float:left; outline:none; color:#fff; line-height:24px; text-align:center; font-size:16px; font-weight:bold; overflow:hidden}

#navCur{ position:absolute; left:0; bottom:0; height:3px; color:#F00; width:67px; margin:0; padding:0; display: block; float:none; background:#FF0000; cursor:pointer;  overflow:hidden}

</style>

</head>

<body>

    <div id="nav">

        <ul class="cf">

           

            <li><a href=""  hidefocus="true">1</a></li>

                <li><a href="1" hidefocus="true">2</a></li>

                <li class="cur"><a href="http://www.xxx.cn"  hidefocus="true">手機(jī)主題下載</a></li>

                <li><a href="3" hidefocus="true">4</a></li>

                <li><a href="4" hidefocus="true">5</a></li>

                <li><a href="5" hidefocus="true">6</a></li>

               

        </ul>

            <span id="navCur"></span>

        </div>

<script type="text/javascript">

(function(){

var curPostion,thisLeft, curPostion_1;

var obj = getId('nav').getElementsByTagName('ul')[0], timer = null ,navCur = getId('navCur'),x,liArr = getId('nav').getElementsByTagName('li'),liLength = liArr.length-1;

for (var x=0;x<liArr.length; x++ ){

liArr[liLength].style.paddingRight = "0";

var li = liArr[x],curPostion = navCur.offsetLeft;

if(li.className == "cur"){ 

navCur.style.left = li.offsetLeft + "px";

}

li.onmouseover=function(){

clearTimeout(timer);

thisLeft = this.offsetLeft;

if (thisLeft > navCur.offsetLeft)

{

hover();

}

else

{

curPostion_1 = this.offsetLeft;

out();

}

};

li.onmouseout=function(){

clearTimeout(timer);

if (curPostion < navCur.offsetLeft)

{

curPostion_1 = curPostion;

out();

}

else

{

thisLeft  = curPostion;

hover();

}

};

}

function hover(){

if (navCur.offsetLeft <= thisLeft)

{

var a = Math.max(parseInt((thisLeft - navCur.offsetLeft) / 15), 3);

navCur.style.left = navCur.offsetLeft + a + "px";

timer = setTimeout(arguments.callee, 5);

}

else

{

navCur.style.left = thisLeft + "px";

clearTimeout(timer);

}

}

function out(){

if (navCur.offsetLeft >= curPostion_1)

{

var a = Math.max(parseInt((navCur.offsetLeft - curPostion_1) / 15), 3);

navCur.style.left = navCur.offsetLeft - a + "px";

timer = setTimeout(arguments.callee, 5);

}

else

{

navCur.style.left = curPostion_1 + "px";

clearTimeout(timer);

}

}

function getId(id){

return document.getElementById(id)

}

})();

</script>

</body>

</html>


--結(jié)束END--

本文鏈接: http://www.kblvmr5.cn/resources/navigation/1102.html (轉(zhuǎn)載時請注明來源鏈接)

 
本文標(biāo)簽: 全部

下班PC閱讀不方便?

手機(jī)也可以隨時學(xué)習(xí)開發(fā)

微信關(guān)注公眾號“億搜云”
"億搜云平臺前端開發(fā)教學(xué)"
每日干貨技術(shù)分享
 

×

成為 億搜云平臺 代理商!

關(guān)注

微信
關(guān)注

微信掃一掃
獲取最新優(yōu)惠信息

億搜云平臺公眾號

客服

聯(lián)系
客服

很高興為您服務(wù)
尊敬的用戶,歡迎您咨詢,我們?yōu)樾掠脩魷?zhǔn)備了優(yōu)惠好禮。 咨詢客服

聯(lián)系客服:

在線QQ: 40819446

客服電話: 15250286283

售前咨詢 售后服務(wù)
在線交談 智能小云

工作時間:

周一至周五: 09:00 - 17:00

WAP

手機(jī)
訪問

移動端訪問
手機(jī)上也能選模板

億搜云平臺手機(jī)端