I'm currently troubleshooting a CSS slideshow that isn't functioning properly. The issue lies within the keyframes. I'm attempting to make the images come down from the top mask and then have the previous image go back up into the mask. This seems to only work on keyframes 1 and 2, and I can't figure out why. My coursework deadline is approaching, so any help would be greatly appreciated!
CSS code:
#content {
background-color: white;
/* border: 1px solid black; */
padding: 0;
width: 100%;
-webkit-box-shadow: 0px 0px 30px 4px #acafb3;
-moz-box-shadow: 0px 0px 30px 4px #acafb3;
box-shadow: 0px 0px 30px 4px #acafb3;
}
#slider {
background-image: url('images/ssgbritain.jpg');
border: 5px solid #eaeaea;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
height: 265px;
width: 998px;
overflow: visible;
position: relative;
}
#fig-container {
margin:0;
padding:0;
position:relative;
}
#mask {
overflow: hidden;
height: 270px;
}
#slider figure {
width: 998px;
/* Width Image */
height: 265px;
/* Height Image */
position: absolute;
top: -270px;
/* Original Position - Outside of the Slider */
}
/* Animation keyframes code here */
HTML code:
<div id="content">
<div id="slider">
<div id="mask">
<div id="fig-container">
<figure>
<img src="http://coursework/web/images/shopping.jpg" alt="Shopping centre" />
<figcaption>rger</figcaption>
</figure>
<figure>
<img src="http://coursework/web/images/ssgbritain.jpg" alt="SS Great Britain" />
<figcaption>rger</figcaption>
</figure>
<figure>
<img src="http://coursework/web/images/susbridge.jpg" alt="Suspension Bridge" />
<figcaption>rger</figcaption>
</figure>
<figure>
<img src="http://coursework/web/images/xmasmarket.jpg" alt="Suspension Bridge" />
<figcaption>rger</figcaption>
</figure>
</div>
</div>
</div>
P.s ignore the bad positioning of the image, seems to only be like that on jsfiddle.