As a developer with limited CSS experience, I am trying to create a CSS3 slideshow using only two images. After discovering some interesting code for this purpose, which can be found here, I decided to make a small change to the original code (specifically, I removed the #cf3 id selector for img .top):
.slide {
position:absolute;
}
@keyframes cf3FadeInOut {
0% {
opacity:1;
}
45% {
opacity:1;
}
55% {
opacity:0;
}
100% {
opacity:0;
}
}
img.top {
animation-name: cf3FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 10s;
animation-direction: alternate;
}
The first image is specified as
<img class="slideshow top" src="img1.jpg">
. The second image is similar, but does not include the "top" class.
Despite all my other CSS functioning correctly on page load, the animation I implemented seems to be missing. Can anyone spot where I may have made a mistake?