Create simple image slideshow in css3 without jquery

by mariganesh 2012-10-06 18:38:50


Pure Css3 Image Slideshow

Copy the Code and give correct path in "img" tag

<style>

#container {
width: 800px;
margin: 20px auto;
text-align: center;
}

#images {
width: 800px;
height: 400px;
overflow: hidden;
position: relative;
margin: 20px auto;
}
#images img {
width: 800px;
height: 400px;

position: absolute;
top: 0;
left: -900px;
z-index: 1;
opacity: 0;

transition: all linear 800ms;
-o-transition: all linear 800ms;
-moz-transition: all linear 800ms;
-webkit-transition: all linear 800ms;
}
#images img:target {
left: 0;
z-index: 9;
opacity: 1;
}
#images img:first-child {
left: 0;
opacity: 1;
}
#slider a {
text-decoration: none;
background: #000;
border: 1px solid #C6E4F2;
padding: 4px 6px;
color: #fff;
}
#slider a:hover {
background: #C6E4F2;
}
</style>

<div id="container">


<div id="images">
<img id="image1" src="./image-slider/1.jpg" />
<img id="image2" src="./image-slider/2.jpg" />
<img id="image3" src="./image-slider/3.jpg" />
<img id="image4" src="./image-slider/4.jpg" />
<img id="image5" src="./image-slider/5.jpg" />
</div>
<div id="slider">
<a href="#image1">1</a>
<a href="#image2">2</a>
<a href="#image3">3</a>
<a href="#image4">4</a>
<a href="#image5">5</a>
</div>
2031
like
2
dislike
4
mail
flag

You must LOGIN to add comments