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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

手動(dòng)切換時(shí)加入延時(shí),并沒有效果,能幫我看看如何寫嗎?

<!doctype html>

<html>

<head>

? ? <meta charset="UTF-8">

<title>Document</title>

<style>

? *{margin:0;

? ? padding:0;

? ? list-style:none;}

? .wrap{height:170px;

? ? ? ? width:490px;

? ? ? ? overflow: hidden;

? ? ? ? position: relative;

? ? ? ? margin:10px auto;}

? .wrap ul{position:absolute;}?

? .wrap ul li{height:170px;

? ? ? ? ? ? ? cursor:pointer;}

? .wrap ol{position:absolute;

? ? ? ? ? ?right:2px;

? ? ? ? ? ?bottom:5px;}

? .wrap ol li{height:20px;?

? ? ? ? ? ? ? width: 20px;

? ? ? ? ? ? ? background:#ccc;

? ? ? ? ? ? ? border:solid 1px #666;

? ? ? ? ? ? ? box-shadow:2px 2px 2px grey;

? ? ? ? ? ? ? border-radius:5px;

? ? ? ? ? ? ? margin-left:5px;

? ? ? ? ? ? ? color:#000;

? ? ? ? ? ? ? float:left;

? ? ? ? ? ? ? line-height:20px;

? ? ? ? ? ? ? text-align:center;

? ? ? ? ? ? ? cursor:pointer;}

? .wrap ol .on{background:#E97305;

? ? ? ? ? ? ? ?color:#fff;}


? </style>

? <script type="text/javascript">

? window.onload=function(){

? ? var wrap=document.getElementById('wrap');

? ? var pics=document.getElementById('pic').getElementsByTagName("li");

? ? var lists=document.getElementById('list').getElementsByTagName('li');

? ??

? ? //圖片輪播

? ? var index=0;

? ? var timer=null;

? ? timer=setInterval(function(){

? ? ? ? index++;

? ? ?if(index>=lists.length){

? ? ?index=0;

? ? ?}

? ? ?for(var j=0;j<lists.length;j++){

? ? ?lists[j].className="";

? ? ?pics[j].style.display="none";

? ? ?}

? ? ?lists[index].className="on";

? ? ?pics[index].style.display="block";

? ? },2000);


? ??

? ? //鼠標(biāo)滑過、滑出事件

? ? for(var i=0;i<lists.length;i++){

? ? ?lists[i].id=i;

? ? ?lists[i].onmouseover=function(){

? ? ?clearInterval(timer); //必須清除定時(shí)器!

? ? ?//延時(shí)切換

? ? ?if(timer){

? ? ?clearTimeout(timer);

? ? ?}

? ? ?var that=this;

? ? ?timer=setTimeout(function(){

? ? ?for(var j=0;j<lists.length;j++){

? ? ?lists[j].className="";

? ? ?pics[j].style.display="none";

? ? ?}

? ? ?lists[that.id].className="on";

? ? ?pics[that.id].style.display="block";

? ? ?},500);

? ? ?index=this.id;

? ? ?

? ? ?/*

? ? ?*for(var j=0;j<lists.length;j++){

? ? ?lists[j].className="";

? ? ?pics[j].style.display="none";

? ? ?}

? ? ?lists[this.id].className="on";

? ? ?pics[this.id].style.display="block";

? ? ?index=this.id; //解決鼠標(biāo)離開后跳欄的問題!!很重要!

? ? ? */

? ? ?}

? ? ?pics[i].onmouseover=function(){

? ? ?clearInterval(timer);


? ? ?}

? ? ?

? ? ?lists[i].onmouseout=function(){

? ? ?timer=setInterval(function(){

? ? ? ? ? ? ?index++;

? ? ? ? ? ? ?if(index>=lists.length){

? ? ? ? ? ? ?index=0;

? ? ? ? ? ? ?}

? ? ? ? ? ? ?for(var j=0;j<lists.length;j++){

? ? ? ? ? ? ?lists[j].className="";

? ? ? ? ? ? ?pics[j].style.display="none";

? ? ? ? ? ? ?}

? ? ? ? ? ? ?lists[index].className="on";

? ? ? ? ? ? ?pics[index].style.display="block";

? ? ? ? ? ? },2000);

? ? ?}

? ? ?pics[i].onmouseout=function(){

? ? ?timer=setInterval(function(){

? ? ? ? ? ? ?index++;

? ? ? ? ? ? ?if(index>=lists.length){

? ? ? ? ? ? ?index=0;

? ? ? ? ? ? ?}

? ? ? ? ? ? ?for(var j=0;j<lists.length;j++){

? ? ? ? ? ? ?lists[j].className="";

? ? ? ? ? ? ?pics[j].style.display="none";

? ? ? ? ? ? ?}

? ? ? ? ? ? ?lists[index].className="on";

? ? ? ? ? ? ?pics[index].style.display="block";

? ? ? ? ? ? },2000);

? ? ?}

? ? }

}

? </script>

</head>

<body>

? <div id='wrap'>

? ? <ul id="pic">

? ? ? <li><img src="http://img1.sycdn.imooc.com//54111cd9000174cd04900170.jpg" alt=""></li>

? ? ? <li><img src="http://img1.sycdn.imooc.com//54111dac000118af04900170.jpg" alt=""></li>

? ? ? <li><img src="http://img1.sycdn.imooc.com//54111d9c0001998204900170.jpg" alt=""></li>

? ? ? <li><img src="http://img1.sycdn.imooc.com//54111d8a0001f41704900170.jpg" alt=""></li>

? ? ? <li><img src="http://img1.sycdn.imooc.com//54111d7d00018ba604900170.jpg" alt=""></li> ? ?

? ? </ul>

? ? <ol id="list">

? ? ? <li>1</li>

? ? ? <li>2</li>

? ? ? <li>3</li>

? ? ? <li>4</li>

? ? ? <li>5</li>

? ? </ol>

? </div>

</body>

</html>


正在回答

1 回答

?<div id='wrap'>少寫一個(gè)class='wrap'

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

手動(dòng)切換時(shí)加入延時(shí),并沒有效果,能幫我看看如何寫嗎?

我要回答 關(guān)注問題
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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