Pure CSS3 Image Slider for Blogspot (Cycle Style)

I don't recommend using CSS slider on your pro website. Instead use a jQuery Slider


Here I came up with a stylish and hot image slider for blogger that is just using pure CSS3. No Javascript or jQuery is used. So this slider is more easy to customize for newbies, just need a basic HTML and little good CSS3 knowledge. No server side coding is used here, so all is on your hand. This cycle style slider is created by smashingmagazine. Take a look on their page for more about it.
I created a bogarized version from theirs, it is now just need to follow few easy steps to installing this slider on blogspot blog.

Lets follow the simple 4 steps to add this "CSS3 image slider to Blogger blog"

1. Go to Blogger Dashboard > Layout > 
2. Add a HTML/Javascript Gadget
3. Copy the code below and paste on it.

<style type="text/css" media="screen">
.container {
    margin: 0 auto;
    overflow: hidden;
    width: 700px;
}

#content-slider {
    height: 335px;
    width: 100%;
}

#slider {
    background: none repeat scroll 0 0 #000000;
    border: 5px solid #FFFFFF;
    -webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
       -moz-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
            box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
    height: 320px;
    margin: 10px auto;
    overflow: visible;
    position: relative;
    width: 680px;
}

#mask {
    height: 320px;
    overflow: hidden;
}

#slider ul {
    margin: 0;
    padding: 0;
    position: relative;
}

#slider li {
    width: 680px;
    height: 320px;
    position: absolute;
    top: -325px;
    list-style: none;
}

#slider li.firstanimation {
    -moz-animation: cycle 25s linear infinite;
    -webkit-animation: cycle 25s linear infinite;
}

#slider li.secondanimation {
    -moz-animation: cycletwo 25s linear infinite;
    -webkit-animation: cycletwo 25s linear infinite;
}

#slider li.thirdanimation {
    -moz-animation: cyclethree 25s linear infinite;
    -webkit-animation: cyclethree 25s linear infinite;
}

#slider li.fourthanimation {
    -moz-animation: cyclefour 25s linear infinite;
    -webkit-animation: cyclefour 25s linear infinite;
}

#slider li.fifthanimation {
    -moz-animation: cyclefive 25s linear infinite;
    -webkit-animation: cyclefive 25s linear infinite;
}

#slider .tooltip {
    background: rgba(0, 0, 0, 0.7);
    width: 300px;
    height: 60px;
    position: relative;
    bottom: 75px;
    left: -320px;
    -moz-transition: all 0.3s ease-in-out;
    -webkit-transition: all 0.3s ease-in-out;
}

#slider .tooltip h1 {
    color: #fff;
    font-size: 24px;
    font-weight: 300;
    line-height: 60px;
    padding: 0 0 0 20px;
}

#slider li#first:hover .tooltip,
#slider li#second:hover .tooltip,
#slider li#third:hover .tooltip,
#slider li#fourth:hover .tooltip,
#slider li#fifth:hover .tooltip {
    left: 0px;
}


/* PROGRESS BAR */

.progress-bar {
    position: relative;
    top: -5px;
    width: 680px;
    height: 5px;
    background: #000;
    -moz-animation: fullexpand 25s ease-out infinite;
    -webkit-animation: fullexpand 25s ease-out infinite;
}


/* ANIMATION */

@-moz-keyframes cycle {
    0% {
        top: 0px;
    }
    4% {
        top: 0px;
    }
    16% {
        top: 0px;
        opacity: 1;
        z-index: 0;
    }
    20% {
        top: 325px;
        opacity: 0;
        z-index: 0;
    }
    21% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
    92% {
        top: -325px;
        opacity: 0;
        z-index: 0;
    }
    96% {
        top: -325px;
        opacity: 0;
    }
    100% {
        top: 0px;
        opacity: 1;
    }
}

@-moz-keyframes cycletwo {
    0% {
        top: -325px;
        opacity: 0;
    }
    16% {
        top: -325px;
        opacity: 0;
    }
    20% {
        top: 0px;
        opacity: 1;
    }
    24% {
        top: 0px;
        opacity: 1;
    }
    36% {
        top: 0px;
        opacity: 1;
        z-index: 0;
    }
    40% {
        top: 325px;
        opacity: 0;
        z-index: 0;
    }
    41% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
    100% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
}

@-moz-keyframes cyclethree {
    0% {
        top: -325px;
        opacity: 0;
    }
    36% {
        top: -325px;
        opacity: 0;
    }
    40% {
        top: 0px;
        opacity: 1;
    }
    44% {
        top: 0px;
        opacity: 1;
    }
    56% {
        top: 0px;
        opacity: 1;
    }
    60% {
        top: 325px;
        opacity: 0;
        z-index: 0;
    }
    61% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
    100% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
}

@-moz-keyframes cyclefour {
    0% {
        top: -325px;
        opacity: 0;
    }
    56% {
        top: -325px;
        opacity: 0;
    }
    60% {
        top: 0px;
        opacity: 1;
    }
    64% {
        top: 0px;
        opacity: 1;
    }
    76% {
        top: 0px;
        opacity: 1;
        z-index: 0;
    }
    80% {
        top: 325px;
        opacity: 0;
        z-index: 0;
    }
    81% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
    100% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
}

@-moz-keyframes cyclefive {
    0% {
        top: -325px;
        opacity: 0;
    }
    76% {
        top: -325px;
        opacity: 0;
    }
    80% {
        top: 0px;
        opacity: 1;
    }
    84% {
        top: 0px;
        opacity: 1;
    }
    96% {
        top: 0px;
        opacity: 1;
        z-index: 0;
    }
    100% {
        top: 325px;
        opacity: 0;
        z-index: 0;
    }
}

@-webkit-keyframes cycle {
    0% {
        top: 0px;
    }
    4% {
        top: 0px;
    }
    16% {
        top: 0px;
        opacity: 1;
        z-index: 0;
    }
    20% {
        top: 325px;
        opacity: 0;
        z-index: 0;
    }
    21% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
    50% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
    92% {
        top: -325px;
        opacity: 0;
        z-index: 0;
    }
    96% {
        top: -325px;
        opacity: 0;
    }
    100% {
        top: 0px;
        opacity: 1;
    }
}

@-webkit-keyframes cycletwo {
    0% {
        top: -325px;
        opacity: 0;
    }
    16% {
        top: -325px;
        opacity: 0;
    }
    20% {
        top: 0px;
        opacity: 1;
    }
    24% {
        top: 0px;
        opacity: 1;
    }
    36% {
        top: 0px;
        opacity: 1;
        z-index: 0;
    }
    40% {
        top: 325px;
        opacity: 0;
        z-index: 0;
    }
    41% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
    100% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
}

@-webkit-keyframes cyclethree {
    0% {
        top: -325px;
        opacity: 0;
    }
    36% {
        top: -325px;
        opacity: 0;
    }
    40% {
        top: 0px;
        opacity: 1;
    }
    44% {
        top: 0px;
        opacity: 1;
    }
    56% {
        top: 0px;
        opacity: 1;
        z-index: 0;
    }
    60% {
        top: 325px;
        opacity: 0;
        z-index: 0;
    }
    61% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
    100% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
}

@-webkit-keyframes cyclefour {
    0% {
        top: -325px;
        opacity: 0;
    }
    56% {
        top: -325px;
        opacity: 0;
    }
    60% {
        top: 0px;
        opacity: 1;
    }
    64% {
        top: 0px;
        opacity: 1;
    }
    76% {
        top: 0px;
        opacity: 1;
        z-index: 0;
    }
    80% {
        top: 325px;
        opacity: 0;
        z-index: 0;
    }
    81% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
    100% {
        top: -325px;
        opacity: 0;
        z-index: -1;
    }
}

@-webkit-keyframes cyclefive {
    0% {
        top: -325px;
        opacity: 0;
    }
    76% {
        top: -325px;
        opacity: 0;
    }
    80% {
        top: 0px;
        opacity: 1;
    }
    84% {
        top: 0px;
        opacity: 1;
    }
    96% {
        top: 0px;
        opacity: 1;
        z-index: 0;
    }
    100% {
        top: 325px;
        opacity: 0;
        z-index: 0;
    }
}


/* ANIMATION BAR */

@-moz-keyframes fullexpand {
    0%,
    20%,
    40%,
    60%,
    80%,
    100% {
        width: 0%;
        opacity: 0;
    }
    4%,
    24%,
    44%,
    64%,
    84% {
        width: 0%;
        opacity: 0.3;
    }
    16%,
    36%,
    56%,
    76%,
    96% {
        width: 100%;
        opacity: 0.7;
    }
    17%,
    37%,
    57%,
    77%,
    97% {
        width: 100%;
        opacity: 0.3;
    }
    18%,
    38%,
    58%,
    78%,
    98% {
        width: 100%;
        opacity: 0;
    }
}

@-webkit-keyframes fullexpand {
    0%,
    20%,
    40%,
    60%,
    80%,
    100% {
        width: 0%;
        opacity: 0;
    }
    4%,
    24%,
    44%,
    64%,
    84% {
        width: 0%;
        opacity: 0.3;
    }
    16%,
    36%,
    56%,
    76%,
    96% {
        width: 100%;
        opacity: 0.7;
    }
    17%,
    37%,
    57%,
    77%,
    97% {
        width: 100%;
        opacity: 0.3;
    }
    18%,
    38%,
    58%,
    78%,
    98% {
        width: 100%;
        opacity: 0;
    }
}
</style>
<div class="container">
    <div id="content-slider">
        <div id="slider">
            <div id="mask">
                <ul>
                    <li id="first" class="firstanimation">
                        <a href="http://dimpost.com">
                            <img src="http://project.dimpost.com/image-slider/images/img_1.jpg" alt="Cougar" />
                        </a>
                        <div class="tooltip">
                            <h1>Cougar</h1>
                        </div>
                    </li>
                    <li id="second" class="secondanimation">
                        <a href="#">
                            <img src="http://project.dimpost.com/image-slider/images/img_2.jpg" alt="Lions" />
                        </a>
                        <div class="tooltip">
                            <h1>Lions</h1>
                        </div>
                    </li>
                    <li id="third" class="thirdanimation">
                        <a href="#">
                            <img src="http://project.dimpost.com/image-slider/images/img_3.jpg" alt="Snowalker" />
                        </a>
                        <div class="tooltip">
                            <h1>Snowalker</h1>
                        </div>
                    </li>
                    <li id="fourth" class="fourthanimation">
                        <a href="#">
                            <img src="http://project.dimpost.com/image-slider/images/img_4.jpg" alt="Howling" />
                        </a>
                        <div class="tooltip">
                            <h1>Howling</h1>
                        </div>
                    </li>
                    <li id="fifth" class="fifthanimation">
                        <a href="#">
                            <img src="http://project.dimpost.com/image-slider/images/img_5.jpg" alt="Sunbathing" />
                        </a>
                        <div class="tooltip">
                            <h1>Sunbathing</h1>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="progress-bar"></div>
        </div>
    </div>
</div>

4. Change link and images with yours.
Share this post
  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to Stumble Upon
  • Share to Evernote
  • Share to Blogger
  • Share to Email
  • Share to Yahoo Messenger
  • More...

25 comments

  1. Not working in Internet Explorer!

    ReplyDelete
  2. This Pure CSS3 Slider won't work perfectly in Internet Explorer. Use any JavaScript/jQuery slider.

    Thanks for asking Nándor Ras

    ReplyDelete
  3. Amazing Work all the sliders are awesome.
    i want to as where did you learn to code CSS/JAVASCRIPT/jQuery?

    ReplyDelete
  4. Works like charm (h)
    Please tell me way to change the transitions

    ReplyDelete
  5. Hi and thank yoy very much!!There is a problem.It don't work with browsers opera and chrome.Why??With firefox its perfect but it do not work for others browsers!Pleace check it!

    ReplyDelete
    Replies
    1. Hello vaiol, I recommend you to use any of jQuery slider instead of css slider. Because css sliders creates problem in different browser. However if you want to use this css slider, you have to fix cross browser problem yourself.

      Delete
  6. HELP NEEDED PLEASE ... I have inserted the pure CSS3 Image Slider into a blogger template. Everything is working fine until it gets to the final transition in the slider, which comes up BLANK. Have double checked the image link and the code. Have even tried replacing the last one with earlier slides that do work. But this did not resolve the issue either.

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. several template can not use this slider..
    I use with different blog.
    .Thanks.

    ReplyDelete
  9. Nice..but i need to change the slide box..i was change the resolution in 610px X 320px but not works..please help ..

    ReplyDelete
  10. Hi, I entered the code and viewed the blog in the latest versions of Chrome and Firefox. All I can see is a black box. Am I doing something wrong. Look forward to your response

    ReplyDelete
  11. How can i change its width and height ?

    ReplyDelete
  12. heyyyy its working but as if i am linking all the images to different links i am getting only one link to all the images. How can i solve it..

    ReplyDelete
  13. Amazing effects. I never imagined the slider could be created with only CSS. Only one drawback is that, it might not work in other browsers. Still appreciated as it is simple to understand the code with no complex javascript.

    ReplyDelete
  14. Having real problems getting any of these sliders to work on my blog. Could you take a look for me please? www.vanillaretro.blogspot.co.uk

    ReplyDelete
  15. :) (h) nice work .............
    but very long time not update new slider so plz put new slider in our website.... tx

    ReplyDelete
  16. Hi there! A little help: This slider is set for 5 images but I would like to use just 3 images. I tried erasing cycles 4 and 5 but no luck. Could you tell me how to make that happen? Thanks :p

    ReplyDelete
  17. hi i need a little help, how can i make the pictures am uploading size the widget frame. check http://www.lancyscoreslive.ga

    ReplyDelete
  18. This is a nice work. I love it. Thank you very much. I want to get the translation left to right as well as the title of slide image on top. How can I do that

    ReplyDelete

 
© 2013- Image Slider For Blogger
Created & Maintained by Shuvojit Das
Powered by blogger.com
Privacy Policy | Contact Me
Back to top