I'm pretty sure it's possible to do a css only image crossfade using the new css animation features. My requirements are that it should work for arbitrary number of images without javascript.
Does anyone know how it's done?
How I'm starting off:
img(src='img1.png')
img(src='img2.png')
img(src='img3.png')
img(src='img4.png')
Next all the images are set to stack on top of each other with the first one showing:
img
opacity 0
transition 1s
position absolute
&:first-child
opacity 100
Now how do I go through each image?
Edit: Seems impossible. Requires javascript.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…