这是demo封装的一个图片轮播效果;
demo演示1:https://www.html.cn/demo/Animate Image/index.html
这个没有加轮播效果,图片滚动只能靠点击
demo演示2:https://www.html.cn/demo/Animate Image/index2.html
这个已经加上了定时轮播,封装也更加合理, 有些bugs
========================2009年 1月22日更新===============================
修复了些bugs
demo演示3:https://www.html.cn/demo/Animate Image/index3.html
?
使用方法:
当用户点击左边区域时, 浏览下一张, 如果为最后一张图片,则返回第一张;
点击右边时,浏览上一张, 如果为第一张,则返回最后一张。
下面的数字滚动条,也可点击。呵呵, 具体如何, 你点击看看!
sliderIMG.create(‘DIVid’,{count:*, speed:*, auto:*, timer:*});
必须参数: count ----> 数字类型, 图片数量; 可选参数: speed ----> 数字类型, 滚动速率, 默认为:5; auto ----> 布尔类型, 设置自动滚动, 为true则自动, 反之不自动, 默认为: false; timer ----> 数字类型, 设置每个几秒自动滚动一次, 默认为: 5000ms = 5s;
最新评论
写的挺好的
有没有兴趣翻译 impatient js? https://exploringjs.com/impatient-js/index.html
Flexbox playground is so great!
感谢总结。
awesome!
这个好像很早就看到类似的文章了
比其他的教程好太多了
柯理化讲的好模糊…没懂