Due to some circumstances, this blog is now up for sale, for more enquires contact: Plushista@gmail.com
RealcomBiz
Pin It

CSS3 Animated Hover Effect For Images

by Durodola Ridwan | Tuesday, October 01, 2013 | 20 Comments

Are you tired of that dull boring images on your blog? Why don't you give CSS3 transition effect a try?
Transition effect is one of the new CSS3 features which allow web developer to create a hover effect between two element. You can't imagine how effective transition effect is, and how site visitors get attracted to it, until you test them out and watch lots of  buzz from people asking you for a way of doing that.



In this tutorial, we will be discussing on how you can apply a simple white transparent background which will flash through your blog image's on hover within a specified time.




The HTML Markup

We will be using two div tag, the first div wraps the main image we want to apply the shine effect to, while the second div wraps the shine effect tag.

<div class="image-shine">
    <img src="IMAGE-URL" />
    <div class="hover-shine"></div>
</div>


The CSS Markup

Now, we will create CSS for the shine effect. In which the width and height must be placed at 100% and the effect will start from the top right corner of the image.

.image-shine{
    width:  250px;
    height: 250px;
    position: relative;
}
.hover-shine{
    width:100%; height: 100%;
    background-image: url(http://4.bp.blogspot.com/-33qEOAK6J1E/UknXiuquI4I/AAAAAAAAEhA/v50bvnMQ3T0/s1600/shine.png);
    position: absolute;
    /*Posicion inicial del shine*/
    background-position: -260px 0;
    left:0px; top:0px;
    background-repeat:no-repeat;
}

We specify -260px for the shine background position to the left, so as to prevent it from appearing on the main image before the hover.

The transition effect works upon three values. The first is the element that the transition is applied to, that in our case will be background-position; the second parameter that receives the transition effect is the time taken for the shine background to shine through the main image in seconds, and the third parameter is the transition type that can be: linear, bounce, ease, ease-in, ease-out, ease in-out.

    -webkit-transition: background-position .4s ease;
       -moz-transition: background-position .4s ease;
         -o-transition: background-position .4s ease;
            transition: background-position .4s ease;

Now, we specify the shine background position after placing the cursor on the image (hover), but will return to its initial position (-260px) after removing the cursor.

.hover_shine:hover{
    background-position: 250px 0;
}


Putting Them All Together

I think you should now understand how the transition effect is been formed? Putting all the code together, the final code will look as follow:

<style>

.image-shine{
    width:  250px;
    height: 250px;
    position: relative;
}
.hover-shine{
    width:100%; height: 100%;
    background-image: url(http://4.bp.blogspot.com/-33qEOAK6J1E/UknXiuquI4I/AAAAAAAAEhA/v50bvnMQ3T0/s1600/shine.png);
    position: absolute;
    /*Posicion inicial del shine*/
    background-position: -260px 0;
    left:0px; top:0px;
    background-repeat:no-repeat;
    -webkit-transition: background-position .4s ease;
       -moz-transition: background-position .4s ease;
         -o-transition: background-position .4s ease;
            transition: background-position .4s ease;
}
.hover-shine:hover{
    background-position: 250px 0;
}

</style>

<div class="image-shine">
    <img src="IMAGE-URL" />
    <div class="hover-shine"></div>
</div>


Some interesting tutorials you might like:
Hope you like this new transition effect? Talk to you soon pals. Peace!



Go Social:

Subscribe For Free Updates!

*Please confirm the email sent to your inbox after clicking "Sign Up!".

20 comments : Post Yours! Read Comment Policy ▼
PLEASE NOTE:
We have Zero Tolerance to Spam. Chessy Comments and Comments with Links will be deleted immediately upon our review.

  1. you can do it now just use CSS ... http://cdpn.io/HvIqx
    nice blog bro, nice to meet you ^_^

    ReplyDelete
  2. I enjoyed over read your blog post. Your blog have nice information, I got good ideas from this amazing blog. I am always searching like this type blog post. I hope I will see again..
    cool games| cool math games| 8 ball pool| sudoku| yoob| stickman games| unblocked games | shooting games| friv4school|
    happy wheels| fighting games

    ReplyDelete
  3. Thanks for giving me the useful information. I think I need it! –
    Good post however , I was wondering if you could write a litte more on this subject?
    minecraft games | fnaf |tetris - puzzle games
    happy wheels | abcdeya |agario hi | brain games

    ReplyDelete
  4. Let’s keep out sites for your child! click:
    brain games | puzzle games | tetris | happy wheels | agario | abcya | fnaf 4 | super mario games
    To play for free!

    ReplyDelete
  5. I must appreciate the way you have expressed your feelingsthrough your blog!. Click here to play
    shooting games | dog games | fighting games | mickey mouse games | Subway Surfers

    ReplyDelete
  6. All the best blogs that is very useful for keeping me share the ideas
    of the future as well this is really what I was looking for, and I am
    very happy to come here. Thank you very much
    earn to die
    earn to die 2
    earn to die 3
    Hi! I’ve been reading your blog for a while now and finally got the
    earn to die 4
    courage to go ahead and give youu a shout out from
    earn to die 6
    Austin Texas! Just wanted to tell
    earn to die 5
    you keep up the fantastic work!my weblog
    age of war
    Hi! I’ve been reading your blog for a while now and finally got the
    happy wheels
    strike force heroes
    slither io
    slitherio

    ReplyDelete
  7. I must appreciate the way you have expressed your feelingsthrough your blog!. Click here to play
    shooting games | dog games | fighting games | mickey mouse games | Subway Surfers

    ReplyDelete
  8. Hotmail is an email account of Microsoft Corporation. Like Google's Gmail, it is full of features usually xuyen.Neu of an email you want to register an account please follow these basic steps:
    Hotmail login

    Hotmail review

    Sign in to hotmail

    Login to hotmail

    Recover hotmail password

    Tank Trouble is a very interesting flash game about tanks, about war and about destruction
    TANK TROUBLE | TANK TROUBLE 2

    One Penguin Takes it personally when he is surfing the web and stumbles upon a web site telling him that he cant fly, after that he sets his mind to research and practice flying until he can prove the world that he can..
    IO GAMES | Slitherio | LEARN TO FLY | LEARN TO FLY 2

    Strike Force Heroes is a new game action-packed shooter from the creators of Raze; with 3 game modes, 15 campaign missions and over 65 weapons.
    Strike Force Heroes 4

    Strike Force Heroes

    ReplyDelete
  9. I must appreciate the way you have expressed your feelingsthrough your blog!. Click here to play.
    vertix.io | dog games | fighting games | mickey mouse games | Subway Surfers

    ReplyDelete
  10. Its more informative and interesting article, we can lean many useful topic here.
    How to Get top Call Girls Service

    ReplyDelete
  11. thank your contributions are recorded in the article! I learned a lot.
    thanks for the article, I'm always follow you!
    follow me on : Abcya Games

    ReplyDelete
  12. Enjoy music after hours of strenuous work is my hobby, my music brought more positive thoughts, help me always optimistic
    baixar musicas , baixar musicas , baixar musicas , baixar musicas , baixar musicas , baixar musicas , baixar musicas , baixar musicas, baixar musicas , baixar musicas , baixar musicas , baixar musicas , baixar musicas

    ReplyDelete
  13. I know that today's young people would love to exchange friendship through social networks, I was one of them, it's really fun because I never feel lonely
    snapchat , snapchat , snapchat , snapchat , snapchat , snapchat , snapchat , snapchat , snapchat , snapchat , snapchat , snapchat , snapchat

    ReplyDelete
  14. To join the free games you go here. It will have a lot of great games for you that
    gun mayhem 3 | can your pet 2
    learn to fly 3 | happywheels
    tank trouble 3

    ReplyDelete

About Me

My Photo
Durodola Ridwan is a Professional blogger, SEO Consultant, Certified Web developer/designer and founder of www.realcombiz.com. He love writing about Blogging tips, SEO, and play around with codes. You can connect with him on facebook, twitter @realcombiz, and Google+.

Recent Posts

Let's Connect

Site Links

Copyright © 2014 RealcomBiz. All Rights Reserved.
Powered by Blogger