This is a very cool image carrousel making by original javascript. ###HTML Structrue
###Supplementary explanation In this HTML structure,the attribute of data-setting is use to setting the params of carrousel.It will be read by JS. In a way,This plugin used this way to deliver params.###Parameter configuration width:1000, //幻灯片区域的宽度 height:400, //幻灯片区域的高度 carrouselWidth:700, //幻灯片第一帧的宽度 carrouselHeight:400, //幻灯片第一帧的高度 scale:0.9,//记录显示比例关系,例如第二张图比第一张图显示的时候宽高小多少 autoPlay:true,//是否自动播放 timeSpan:3000,//自动播放时间间隔 verticalAlign:'middle' //图片对齐方式,有top\middle\bottom三种方式,默认为middle ###usage Just like this way: window.onload=function(){ Carrousel.init(document.querySelectorAll('.carrousel-main')); }