做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

利用JS做網頁特效_大圖輪播(實例講解)

來源:懂視網 責編:小采 時間:2020-11-27 22:33:05
文檔

利用JS做網頁特效_大圖輪播(實例講解)

利用JS做網頁特效_大圖輪播(實例講解):廢話不多說,直接上代碼: <style> * { margin: 0px; padding: 0px; } .stage { width: 500px; height: 300px; border: 5px solid black; margin: 200px; position: relative; overflow: hidde
推薦度:
導讀利用JS做網頁特效_大圖輪播(實例講解):廢話不多說,直接上代碼: <style> * { margin: 0px; padding: 0px; } .stage { width: 500px; height: 300px; border: 5px solid black; margin: 200px; position: relative; overflow: hidde

廢話不多說,直接上代碼:

<style>
 * {
 margin: 0px;
 padding: 0px;
 }
 
 .stage {
 width: 500px;
 height: 300px;
 border: 5px solid black;
 margin: 200px;
 position: relative;
 overflow: hidden;
 }
 
 .to-left,
 .to-right {
 position: absolute;
 top: 0px;
 width: 50px;
 height: 300px;
 background-color: black;
 color: white;
 font-size: 30px;
 text-align: center;
 line-height: 300px;
 opacity: 0.3;
 }
 
 .to-left {
 left: 0px;
 }
 
 .to-right {
 right: 0px;
 }
 
 .to-left:hover,
 .to-right:hover {
 cursor: pointer;
 opacity: 0.5;
 }
 
 .banner {
 width: 3000px;
 height: 300px;
 }
 
 .items {
 float: left;
 width: 500px;
 height: 300px;
 background-color: blanchedalmond;
 font-size: 100px;
 text-align: center;
 line-height: 300px;
 }
 </style>
 </head>
<!--大圖輪播特效-->
 <body>
 <div class="stage">
 <div class="to-left">
 <</div>
 <div class="to-right">></div>
 <div class="banner">
 <div class="items">1</div>
 <div class="items" style="">2</div>
 <div class="items" style="">3</div>
 <div class="items" style="">4</div>
 <div class="items" style="">5</div>
 <div class="items">1</div>
 </div>
 </div>
 </body>

</html>
<script>
 var to_right = document.getElementsByClassName('to-right')[0];
 var to_left = document.getElementsByClassName('to-left')[0];
 var banner = document.getElementsByClassName('banner')[0];
 var arr = [];
 var count = 1;

 to_right.onclick = function() {
 toRight();
 }
 
 function toRight(){
 arr.push(window.setInterval("moveLeft()", 30));
 }
 
 to_left.onclick = function() {
 toLeft();
 }

 function toLeft(){
 arr.push(window.setInterval("moveRight()", 30));
 }
 
 function moveLeft() {
 if(count < 5) {
 if(banner.offsetLeft > count * (-500)) {
 banner.style.marginLeft = banner.offsetLeft - 20 + "px";
 } else {
 for(var x in arr) {
 window.clearInterval(arr[x]);
 }
 count++;
 }
// 連接點
 }else{
 if(banner.offsetLeft > count * (-500)) {
 banner.style.marginLeft = banner.offsetLeft - 20 + "px";
 } else {
 for(var x in arr) {
 window.clearInterval(arr[x]);
 }
 count = 1;
 banner.style.marginLeft = 0 + 'px';
 }
 }
 }
 
 function moveRight() {
 if(count-1 >0) {
 if(banner.offsetLeft < (count-2) * (-500)) {
 banner.style.marginLeft = banner.offsetLeft + 20 + "px";
 } else {
 for(var x in arr) {
 window.clearInterval(arr[x]);
 }
 count--;
 }
 }
 }
 window.setInterval("toRight()",1750);
 

</script>

以上這篇利用JS做網頁特效_大圖輪播(實例講解)就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

利用JS做網頁特效_大圖輪播(實例講解)

利用JS做網頁特效_大圖輪播(實例講解):廢話不多說,直接上代碼: <style> * { margin: 0px; padding: 0px; } .stage { width: 500px; height: 300px; border: 5px solid black; margin: 200px; position: relative; overflow: hidde
推薦度:
標簽: 使用 js 大圖輪播
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 灵川县| 府谷县| 汽车| 高平市| 资兴市| 泸西县| 泾源县| 兰考县| 昆明市| 汉沽区| 嵊州市| 永福县| 德兴市| 九江县| 青阳县| 南汇区| 九台市| 嘉善县| 庄河市| 左权县| 伊通| 景洪市| 博兴县| 高淳县| 温泉县| 纳雍县| 宣恩县| 甘南县| 大化| 三原县| 沾化县| 基隆市| 垫江县| 武城县| 丰镇市| 洛隆县| 建始县| 库车县| 贵溪市| 赫章县| 大庆市|