原生js滑动轮播封装
本文实例为大家分享了原生js滑动轮播的具体代码,供大家参考,具体内容如下
封装滑动轮播
cmm无缝轮播 *{margin:0;padding:0} #container{ height:470px; width:590px; border:1pxsolidred; position:relative; margin:50pxauto; } #box{ position:absolute; list-style:none; } #boxli{ float:left; } #pages{ width:100%; height:30px; background:#ccc; position:absolute; bottom:0; } #pagesi{ width:20px; height:20px; display:inline-block; border-radius:10px; background:#fff; margin:5px; } #pagesi.current{ background:#f00; } #prev,#next{ width:45px; height:100px; position:absolute; top:0; bottom:0; margin:auto; background:#ccc; line-height:100px; text-align:center; font-size:40px; color:#fff; } #next{ right:0; }