Created
September 23, 2012 02:23
-
-
Save mnafricano/3768583 to your computer and use it in GitHub Desktop.
Text Slider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section> | |
<article> Slide 1 </article> | |
<article> Slide 2 </article> | |
<article> Slide 3 </article> | |
<article> Slide 4 </article> | |
<article> Slide 5 </article> | |
<article> Slide 6 </article> | |
<article> Slide 7 </article> | |
<article> Slide 8 </article> | |
<article> Slide 9 </article> | |
<article> Slide 10 </article> | |
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
background: #aaa; | |
} | |
section { | |
width: 200px; | |
height: 200px; | |
position: relative; | |
left: 50%; | |
top: 1em; | |
margin-left: -100px; | |
overflow: hidden; | |
background: #292929; | |
border: 10px solid #fff; | |
} | |
article { | |
position: absolute; | |
left: 200px; | |
color: #e3e3e3; | |
width: 200px; | |
height: 200px; | |
text-align: center; | |
font: 2em/1em sans-serif; | |
border-box: box-sizing; | |
padding-top: 80px; | |
} | |
article:nth-of-type(1) { | |
animation: slideIn 50s linear 0s infinite; | |
color: hotpink; | |
} | |
article:nth-of-type(2) { | |
animation: slideIn 50s linear 2.5s infinite; | |
color: red; | |
} | |
article:nth-of-type(3) { | |
animation: slideIn 50s linear 5s infinite; | |
color: orange; | |
} | |
article:nth-of-type(4) { | |
animation: slideIn 50s linear 7.5s infinite; | |
color: yellow; | |
} | |
article:nth-of-type(5) { | |
animation: slideIn 50s linear 10s infinite; | |
color: green; | |
} | |
article:nth-of-type(6) { | |
animation: slideIn 50s linear 12.5s infinite; | |
color: blue; | |
} | |
article:nth-of-type(7) { | |
animation: slideIn 50s linear 15s infinite; | |
color: purple; | |
} | |
article:nth-of-type(8) { | |
animation: slideIn 50s linear 17.5s infinite; | |
color: brown; | |
} | |
article:nth-of-type(9) { | |
animation: slideIn 50s linear 20s infinite; | |
color: black; | |
} | |
article:nth-of-type(10) { | |
animation: slideIn 50s linear 22.5s infinite; | |
color: hotpink; | |
} | |
@keyframes slideIn { | |
0% {left: 200px;} | |
1% {left: 100;} | |
10% {left: 0;} | |
11% {left: -200px;} | |
100% {left: -200px;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment