首先实现图片list内容随着time动作:
原理:通过每秒设置left的值的修改来操作
left为左边界终点
#box{ width: 400px; height: 200px; border: 5px solid red; margin: 0 auto; position: relative; margin-top: 100px; z-index: 5; } #img_list{ position: absolute; width: 2000px; } #img_list>div{ width: 400px; float: left; height: 200px; line-height: 200px; color: white; font-size: 28px; text-align: center; background: seagreen; } #arouse{ width:400px; height: 20px; position: absolute; top: 100px; left: 0px; } #left{ width: 20px; height: 20px; border: 1px solid; border-radius: 50%; text-align: center; line-height: 20px; float: left; color: white; background: chartreuse; display: inline-block; } #right{ width: 20px; height: 20px; border: 1px solid; border-radius: 50%; text-align: center; line-height: 20px; color: white; background: chartreuse; display: inline-block; float: right; } 1 2 3 4 5 < >



