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

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

為什么"left:-600"要寫在標簽<div id="list" style="left: -600px;">里面,寫在css里面點擊左劃右劃沒有效果

<!DOCTYPE?html>
<html>
<head>
????<meta?charset="utf-8"?/>
????<title></title>
<style?type="text/css">
*{padding:0;margin:?0;}
body{padding:?50px;}
#container{width:600px;height:400px;border:?3px?solid?#333;position:relative;overflow:hidden;}
#list{width:4200px;height:?400px;position:absolute;}
#list?img{float:?left;width:600px;height:400px;}
#buttons{width:100px;height:10px;position:absolute;bottom:20px;left:250px;}
#buttons?span{float:left;width:10px;height:10px;border:?1px?solid?#fff;border-radius:50%;background:#333;margin-right:?5px;cursor:pointer;}
#buttons?.on{background:#f60;}
.arrow{z-index:99;position:absolute;top:180px;width:40px;height:?40px;font-size:36px;font-weight:bold;text-align:center;color:#fff;background-color:?rgba(0,0,0,0.3);cursor:?pointer;display:?none;}
#container:hover?.arrow{display:block;}
.arrow:hover{background-color:?rgba(0,0,0,0.7);}
#prev{left:20px;}
#next{right:20px;}


</style>

</head>
<body>
??<div?id='container'>
????<div?id='list'?style='left:-600px;'>
??????<img?src="image/5.jpg">
??????<img?src="image/1.jpg">
??????<img?src="image/2.jpg">
??????<img?src="image/3.jpg">
??????<img?src="image/4.jpg">
??????<img?src="image/5.jpg">
??????<img?src="image/1.jpg">
????</div>
????<div?id='buttons'>
??????<span?index='1'?class='on'></span>
??????<span?index='1'></span>
??????<span?index='1'></span>
??????<span?index='1'></span>
??????<span?index='1'></span>
????</div>
????<div?id='prev'?class='arrow'>&lt</div>
????<div?id='next'?class='arrow'>&gt</div>
??</div>

<!--?<script?type="text/javascript"?src='jquery-3.1.1.min.js'></script>?-->
<script?type="text/javascript">
var?container=document.getElementById('container');
var?list=document.getElementById('list');
var?buttons=document.getElementById('list').getElementsByTagName('span');
var?prev=document.getElementById('prev');
var?next=document.getElementById('next');
function?animate(offset){
??var?newLeft=parseInt(list.style.left)+offset;
??list.style.left=newLeft+'px';
??if(newLeft>-600){
????list.style.left=-3000+'px';
??}else?if(newLeft<-3000){
????list.style.left=-600+'px';
??}
}
prev.onclick=function(){
??animate(600);
}
next.onclick=function(){
??animate(-600);
}


</script>
</body>
</html>


正在回答

舉報

0/150
提交
取消

為什么"left:-600"要寫在標簽<div id="list" style="left: -600px;">里面,寫在css里面點擊左劃右劃沒有效果

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

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

幫助反饋 APP下載

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

公眾號

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