Skip to content

Instantly share code, notes, and snippets.

@gentle-media
Created September 19, 2012 10:38
Show Gist options
  • Save gentle-media/3748929 to your computer and use it in GitHub Desktop.
Save gentle-media/3748929 to your computer and use it in GitHub Desktop.
CSS3 fade in/out slideshow experiment
/**
* CSS3 fade in/out slideshow experiment
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box}
#slideshow {
position: relative;
width: 100%;
height: 600px}
#slideshow div {
position: absolute;
width: 100%;
height: 100%;
opacity: 0;
animation:fade 24s ease-in-out infinite}
@keyframes fade {
0% { opacity:0 }
10% { opacity:1 }
100% { opacity:0 }
}
#slideshow div:nth-child(1) {
background: url("http://gentlemedia.nl/b2bweddings2/images/wedding01.jpg") no-repeat center top fixed;
background-size: cover;
animation-delay:6s}
#slideshow div:nth-child(2) {
background: url("http://gentlemedia.nl/b2bweddings2/images/wedding04.jpg") no-repeat center top fixed;
background-size: cover;
animation-delay: 12s}
#slideshow div:nth-child(3) {
background: url("http://gentlemedia.nl/b2bweddings2/images/wedding03.jpg") no-repeat center top fixed;
background-size: cover;
animation-delay:18s}
<div id="slideshow">
<div></div>
<div></div>
<div></div>
</div>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"result"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment