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

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

為什么切換不了圖片呢?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

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

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

<style type="text/css">

*{

margin: 0px;

padding: 0px;

text-decoration: none;

}

body{

padding: 20px;

}

#cntainer{

height: 400px;

width: 600px;

border: 3px solid#333;

overflow: hidden;

position: relative;

}

#list{

height: 400px;

width: 4200px;

z-index: 1;

position: absolute;

background-color: #0C9;

}

#list img{

float: left;

}

#buttons{

position: absolute;

height: 10px;

width: 100px;

bottom: 20px;

left: 250px;

background-color: #999;

z-index: 2;

}

#buttons span{ cursor:pointer; float:left; border:1px solid#fff; width:10px; height:10px; border:-radius;50%; background:#333; margin-right:5px;}

#buttons.on{ background:orangered

}

.arrow{

cursor: pointer;

display: block;

line-height: 39px;

text-align: center;

font-size: 36px;

font-weight: bold;

width: 40px;

height: 40px;

position: absolute;

z-index: 2;

top: 180px;

background: rgba(0,0,0,.3);

color: #FFF;

}

.arrow:hover{ background-color: rgba(0,0,0,.7);}

#container:hover.arrow{ display:block}

#prev{

left: 20px;

}

#next{right:20px}

<script type="text/javascript">

window.onload=function(){

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

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

var buttons=document.getElementById('buttons').getElementsByTagName('span')

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

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

function animate (offset){

list.style.left=parseint(list.style.left)+offset+'px';}

? ?next.onclick=function(){

animate (-600);

}

? ? ? ? ?prev.onclick=function(){

animate (600);

}

}


</script>

</style>

</head>


<body>

<div id="cntainer">

? <div id="list" style="left:-600">

? <img src="圖片/山下/山下-5.jpg" alt="1">

? <img src="圖片/山下/山下-1.jpg" alt="1">

? <img src="圖片/山下/山下-2.jpg" alt="2">

? <img src="圖片/山下/山下-3.jpg" alt="3">

? <img src="圖片/山下/山下-4.jpg" alt="4">

? <img src="圖片/山下/山下-5.jpg" alt="5">

? <img src="圖片/山下/山下-1.jpg" alt="5">

? <div id="buttons">

? ? <span index="1" class="on"></span>

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

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

? ? <span index="4" ></span>

? ? <span index="5" ></span>

? </div>

? </div>

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

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

</div>


</body>

</html>


正在回答

2 回答

你把js放到style標(biāo)簽里面了,要放出來;

list.style.left=parseint(list.style.left)+offset+'px';}這里應(yīng)該是parseInt,I要大寫。

? <div id="list" style="left:-600">這里left少了單位,應(yīng)該是-600px

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

夏冬春雪 提問者

還是不行
2016-01-05 回復(fù) 有任何疑惑可以回復(fù)我~
#2

夏冬春雪 提問者

非常感謝!
2016-01-05 回復(fù) 有任何疑惑可以回復(fù)我~
#3

ppo_YXWU 回復(fù) 夏冬春雪 提問者

window.onload=function(){這里的括號用錯了,你用的是中文的,要英文的括號,現(xiàn)在可以了嗎?
2016-01-05 回復(fù) 有任何疑惑可以回復(fù)我~
#4

夏冬春雪 提問者 回復(fù) ppo_YXWU

恩恩可以了呢 ,謝謝你啦
2016-01-05 回復(fù) 有任何疑惑可以回復(fù)我~
查看1條回復(fù)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

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

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

<style type="text/css">

*{

margin: 0px;

padding: 0px;

text-decoration: none;

}

body{

padding: 20px;

}

#cntainer{

height: 400px;

width: 600px;

border: 3px solid#333;

overflow: hidden;

position: relative;

}

#list{

height: 400px;

width: 4200px;

z-index: 1;

position: absolute;

background-color: #0C9;

}

#list img{

float: left;

}

#buttons{

position: absolute;

height: 10px;

width: 100px;

bottom: 20px;

left: 250px;

background-color: #999;

z-index: 2;

}

#buttons span{ cursor:pointer; float:left; border:1px solid#fff; width:10px; height:10px; border:-radius;50%; background:#333; margin-right:5px;}

#buttons.on{ background:orangered

}

.arrow{

cursor: pointer;

display: block;

line-height: 39px;

text-align: center;

font-size: 36px;

font-weight: bold;

width: 40px;

height: 40px;

position: absolute;

z-index: 2;

top: 180px;

background: rgba(0,0,0,.3);

color: #FFF;

}

.arrow:hover{ background-color: rgba(0,0,0,.7);}

#container:hover.arrow{

display: none

}

#prev{

left: 20px;

}

#next{right:20px}

</style>

<script type="text/javascript">

window.onload=function(){

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

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

var buttons=document.getElementById('buttons').getElementsByTagName('span')

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

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

function animate (offset){

list.style.left=parseInt(list.style.left)+offset+'px';}

? ?next.onclick=function(){

animate (-600);

}

? ? ? ? ?prev.onclick=function(){

animate (600);

}

}


</script>


</head>


<body>

<div id="cntainer">

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

? <img src="圖片/山下/山下-5.jpg" alt="1">

? <img src="圖片/山下/山下-1.jpg" alt="1">

? <img src="圖片/山下/山下-2.jpg" alt="2">

? <img src="圖片/山下/山下-3.jpg" alt="3">

? <img src="圖片/山下/山下-4.jpg" alt="4">

? <img src="圖片/山下/山下-5.jpg" alt="5">

? <img src="圖片/山下/山下-1.jpg" alt="5">

? <div id="buttons">

? ? <span index="1" class="on"></span>

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

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

? ? <span index="4" ></span>

? ? <span index="5" ></span>

? </div>

? </div>

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

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

</div>


</body>

</html>

還是不行!

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

舉報

0/150
提交
取消
焦點圖輪播特效
  • 參與學(xué)習(xí)       65330    人
  • 解答問題       638    個

通過本教程學(xué)習(xí)您將能掌握非常實用的焦點圖輪播特效的制作過程

進(jìn)入課程

為什么切換不了圖片呢?

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

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

幫助反饋 APP下載

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

公眾號

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