Created
February 8, 2014 21:46
-
-
Save meara/8890802 to your computer and use it in GitHub Desktop.
This file contains 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
.carousel { | |
overflow:hidden; | |
width:100%; | |
} | |
.panes { | |
list-style:none; | |
position:relative; | |
width:500%; /* Number of panes * 100% */ | |
overflow:hidden; /* This is used solely to clear floats, it does not add functionality. */ | |
-webkit-animation: slide 30s infinite; /* Safari 4+ */ | |
-moz-animation: slide 30s infinite; /* Fx 5+ */ | |
-o-animation: slide 30s infinite; /* Opera 12+ */ | |
animation: slide 30s infinite; /* IE 10+ */ | |
} | |
.panes > li { | |
position:relative; | |
float:left; | |
width:20%; /* 100 / number of panes */ | |
} | |
.carousel img { | |
display:block; | |
width:100%; | |
max-width:100%; | |
} | |
@keyframes slide { | |
20% { left: 0%; } | |
25% { left: -100%; } | |
45% { left: -100%; } | |
50% { left: -200%; } | |
70% { left: -200%; } | |
75% { left: -300%; } | |
95% { left: -300%; } | |
100% { left: -400%; } | |
} |
This file contains 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
<div class='carousel'> | |
<ul class='panes'> | |
<li><img src='standup.jpg'></li> | |
<li><img src='8am.jpg'/></li> | |
<li><img src='laptops.jpg'/></li> | |
<li><img src='my_face.jpg'/></li> | |
<li><img src='wireframe.jpg'/></li> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment