任何想法为什么这个幻灯片可以在Firefox中工作,但不是在Chrome浏览器?(未在IE中测试过)希望有人能帮助!为什么Firefox向我展示幻灯片,但铬不是?
CSS:
#slideshow {
margin:50px auto;
width:60em;
height:18em;
overflow:hidden;
border:0.4em solid;
border-color: black;
position:relative;
}
.photo{
position:absolute;
animation:round 16s infinite;
opacity:0;
}
@keyframes round{
25%{opacity:1;}
40%{opacity:0;}
}
img:nth-child(4){animation-delay:0s;}
img:nth-child(3){animation-delay:4s;}
img:nth-child(2){animation-delay:8s;}
img:nth-child(1){animation-delay:12s;}
HTML:
<div id="slideshow">
<img class='photo' src="Images/Red.jpeg" alt="">
<img class='photo' src="Images/rose.jpeg" alt="">
<img class='photo' src="Images/White.jpeg" alt="">
<img class='photo' src="Images/rose.jpeg" alt="">
</div>
Chrome(仍然)使用'-webkit-animation'和'@ -webkit-keyframes'。 –
它的工作!非常感谢你! – maxmijn
@NiettheDarkAbsol你可以发布解决方案作为答案,以便他可以选择答案? – Lizz