CSS carousel with dissolving through black images
CSS carousel with dissolving through black images. Made with pure CSS.
HTML
<div class="scrollable">
<div class="items">
<img src="http://farm8.staticflickr.com/7020/6767599565_e0ffee2813_d.jpg" alt="" />
<img src="http://farm8.staticflickr.com/7016/6767598507_21720ed21f_d.jpg" alt="Seven to ten at Leeds & Holbeck" />
<img src="http://farm8.staticflickr.com/7163/6767596393_8f8b9609ec_d.jpg" alt="Seven to ten at Leeds & Holbeck" />
</div>
</div>
CSS
body {
padding: 1em;
background: #999
}
.scrollable {
width: 333px;
margin: 0 auto;
padding: 0;
border:10px solid #fff;
background: #000;
position: relative;
overflow: hidden;
text-align: center;
}
img {
width: 100%;
hight: 100%;
margin: 0;
float:left;
}
.items {
width:999px;
-webkit-animation: dissolve 24s infinite, hscroll 24s infinite;
-moz-animation: dissolve 24s infinite, hscroll 24s infinite;
-ms-animation: dissolve 24s infinite, hscroll 24s infinite;
}
@-webkit-keyframes dissolve {
0% { opacity: 1; }
31.33% { opacity: 1; }
33.33% { opacity: 0; }
35.333% { opacity: 1; }
64.66% { opacity: 1; }
66.66% { opacity: 0; }
68.66% { opacity: 1; }
97.99% { opacity: 1; }
100% { opacity: 0 }
}
@-webkit-keyframes hscroll {
0% { margin-left: 0; }
33.32% { margin-left: 0; }
33.33% { margin-left: -333px; }
66.65% { margin-left: -333px; }
66.66% { margin-left: -666px; }
99.99% { margin-left: -666px; }
100% { margine-left: 0 }
}
@-moz-keyframes dissolve {
0% { opacity: 1; }
31.33% { opacity: 1; }
33.33% { opacity: 0; }
35.333% { opacity: 1; }
64.66% { opacity: 1; }
66.66% { opacity: 0; }
68.66% { opacity: 1; }
97.99% { opacity: 1; }
100% { opacity: 0 }
}
@-moz-keyframes hscroll {
0% { margin-left: 0; }
33.32% { margin-left: 0; }
33.33% { margin-left: -333px; }
66.65% { margin-left: -333px; }
66.66% { margin-left: -666px; }
99.99% { margin-left: -666px; }
100% { margine-left: 0 }
}
@-ms-keyframes dissolve {
0% { opacity: 1; }
31.33% { opacity: 1; }
33.33% { opacity: 0; }
35.333% { opacity: 1; }
64.66% { opacity: 1; }
66.66% { opacity: 0; }
68.66% { opacity: 1; }
97.99% { opacity: 1; }
100% { opacity: 0 }
}
@-ms-keyframes hscroll {
0% { margin-left: 0; }
33.32% { margin-left: 0; }
33.33% { margin-left: -333px; }
66.65% { margin-left: -333px; }
66.66% { margin-left: -666px; }
99.99% { margin-left:...