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

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

小圓點(diǎn)不能正常亮起

<!DOCTYPE?html>
<html>
<head>
<meta?charset="UTF-8">
<title>Document</title>
<style>
*{margin:?0?;padding:?0}
#container?{width:?200px;overflow:?hidden;position:?relative;height:?200px}
#list?{width:?1000px;position:?absolute;}
.v?{float:?left;width:?200px;height:?200px;background:?red}
#buttons?{position:?absolute;right:?10px;bottom:?10px;}
#buttons?span?{display:?block;width:?10px;height:?10px;border-radius:?50%;background:?gray;float:?left;margin:?0?5px;}
#buttons?.on?{background:?orange}
.arrow?{display:?block;width:?10px;height:?40px;background:?rgba(125,125,125,.5);line-height:?40px;position:?absolute;top:?80px;}
#prev?{left:?0}
#next?{right:?0}
</style>
<script>
window.onload=function(){
var?container=document.getElementById("container");
var?list=document.getElementById("list");
var?buttons=document.getElementById("buttons").getElementsByTagName("span");
var?next=document.getElementById("next");
var?prev=document.getElementById("prev");
var?index=1;


function?show(){
for(var?i=0;i<buttons.length;i++){
if(buttons[i].className?=="on"){
buttons[i].className?=?"";
break;
}
}
buttons[index?-?1].className?="on";
}
next.onclick=function(){
show();
index?+=?1;
}
prev.onclick=function(){
show();
index?-=?1;
}
}
</script>
</head>
<body>
<div?id="container">
<div?id="list"?style="left:-200px">
???<div>3</div>
<div>1</div>
<div>2</div>
<div>3</div>
<div>1</div>
</div>
<div?id="buttons">
<span?index="1"?class="on"></span>
<span?index="2"></span>
<span?index="3"></span>
</div>
<a?href="javascript:;"?id="prev">&lt;</a>
????????<a?href="javascript:;"?id="next">&gt;</a>
</div>
</body>
</html>

我的小圓點(diǎn)不能正常亮起來(lái),點(diǎn)擊next()的時(shí)候index不能正常+1;點(diǎn)擊第二次的時(shí)候第二個(gè)小圓點(diǎn)才亮起來(lái),有大神解釋一下嗎?



正在回答

3 回答


5989c6b20001055508120426.jpg
紅色區(qū)域的代碼與藍(lán)色區(qū)域的代碼換下位置順序

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

tracylqd 提問(wèn)者

謝謝!我已經(jīng)發(fā)現(xiàn)了。
2017-08-15 回復(fù) 有任何疑惑可以回復(fù)我~

而且你的a標(biāo)簽少了類名arrow

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

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Document</title>

<style>

*{margin: 0 ;padding: 0}

#container {width: 200px;overflow: hidden;position: relative;height: 200px}

#list {width: 1000px;position: absolute;}

.v {float: left;width: 200px;height: 200px;background: red}

#buttons {position: absolute;right: 10px;bottom: 10px;}

#buttons span {display: block;width: 10px;height: 10px;border-radius: 50%;background: gray;float: left;margin: 0 5px;}

#buttons .on {background: orange}

.arrow {display: block;width: 10px;height: 40px;background: rgba(125,125,125,.5);line-height: 40px;position: absolute;top: 80px;}

#prev {left: 0}

#next {right: 0}

</style>

<script>

window.onload=function(){

var container=document.getElementById("container");

var list=document.getElementById("list");

var buttons=document.getElementById("buttons").getElementsByTagName("span");

var next=document.getElementById("next");

var prev=document.getElementById("prev");

var index=1;



function show(){

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

if(buttons[i].className =="on"){

buttons[i].className = "";

break;

}

}

buttons[index - 1].className ="on";

}

next.onclick=function(){

show();

index += 1;

}

prev.onclick=function(){

show();

index -= 1;

}

}

</script>

</head>

<body>

<div id="container">

<div id="list" style="left:-200px">

? ?<div>3</div>

<div>1</div>

<div>2</div>

<div>3</div>

<div>1</div>

</div>

<div id="buttons">

<span index="1"></span>

<span index="2"></span>

<span index="3"></span>

</div>

<a href="javascript:;" id="prev">&lt;</a>

? ? ? ? <a href="javascript:;" id="next">&gt;</a>

</div>

</body>

</html>


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

舉報(bào)

0/150
提交
取消

小圓點(diǎn)不能正常亮起

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

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

幫助反饋 APP下載

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

公眾號(hào)

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