We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
图片宽度*图片数量
overflow:hidden
在实现渐变轮播时,所有图片都需要全部定位,进行叠加,最后才能实现淡入淡出效果。
playNext()
playPre()
setBullet()
autoPlay()
stopAuto()
查看源码:点击查看 效果预览:点击查看
The text was updated successfully, but these errors were encountered:
No branches or pull requests
实现原理
CSS部分
图片宽度*图片数量
,并将所有图片使用浮动进行水平排列,形成一个滑动轨道;overflow:hidden
将超出容器的内容进行隐藏;JavaScript部分
在实现渐变轮播时,所有图片都需要全部定位,进行叠加,最后才能实现淡入淡出效果。
抽象出来的接口:
playNext()
--> 切换到下一张playPre()
--> 切换到上一张setBullet()
--> 设置状态指示符号autoPlay()
--> 自动轮播stopAuto()
--> 停止自动轮播滚动轮播
查看源码:点击查看
效果预览:点击查看
渐变轮播
查看源码:点击查看
效果预览:点击查看
The text was updated successfully, but these errors were encountered: