因为CSS轮播动画都是写死的,只要两张图你只需要3,4div调用的图和1,2一样就可以了
1 2 3 4 5 6 | < div class = "slideshow" > < div class = "slideshow-image" style = "background-image: url('img/1.jpg')" ></ div > < div class = "slideshow-image" style = "background-image: url('img/2.jpg')" ></ div > < div class = "slideshow-image" style = "background-image: url('img/1.jpg')" ></ div > < div class = "slideshow-image" style = "background-image: url('img/2.jpg')" ></ div > </ div > |
如果直接删除3,4div.就要修改对应的CSS样式,有些麻烦,这样最简单直接