Quantcast
Viewing all articles
Browse latest Browse all 215

Social icons Rollover hover effect using CSS

Image may be NSFW.
Clik here to view.
rollover-social-icons-hover-effect
Rollover social icons
Social icons in a site or blog holds a important place in turning the visitors to followers and adding hover effects to those icons increase the chance. So we are going to see a cool hover effect that can be used with social icons to perform the assigned job. The above hover effect requires a special image in which two images should be spliced in a vertical manner.

Image may be NSFW.
Clik here to view.
spliced-social-icon
Spliced Social icons
We are going to use similar vertically spliced images in this hover effect. The above image was formed by means of two images vertically spliced in order to perform a rollover effect when the image is hovered. 

CSS CODE:


  1. .roll_over{
  2.         height: 48px;
  3.         width: 48px;
  4.         margin: 5px;
  5.         float: left;
  6.         -webkit-transition: all ease 0.5s;
  7.         -moz-transition: all ease 0.5s;
  8.         -o-transition: all ease 0.5s;
  9.         -ms-transition: all ease 0.5s;
  10.         transition: all ease 0.5s;
  11.                }
  12. .roll_over:hover{
  13.                   background-position: 0px -48px;
  14.                             }
  15. .facebook{
  16.          background-image:url('Your image URL');
  17.                 }
  18. .twitter{
  19.         background-image:url('Your image URL');
  20.             }
  21. .google_plus{
  22.                   background-image:url('Your Image URL');
  23.                       }
  24. .linkedin{
  25.          background-image:url('Your Image URL');
  26.                }
  27. .pinterest{
  28.         background-image:url('Your Image URL');
  29.                }
In the above code class "roll_over" was used to assign the height and width of the background image used. And when the image is hovered the height was assigned by means of negative value to display the next image hiding. Other classes ".facebook", ".twitter" ... ".pinterest" was used to assign the URL of the image used for the effect.

HTML CODE:

  1. <a href="Social Profile URL"><div class="facebook roll_over"></div></a>
  2. <a href="Social Profile URL"><div class="twitter roll_over"></div></a>
  3. <a href="Social Profile URL"><div class="google_plus roll_over"></div></a>
  4. <a href="Social Profile URL"><div class="linkedin roll_over"></div></a>
  5. <a href="Social Profile URL"><div class="pinterest roll_over"></div></a>
The HTML part was pretty straightforward, here the class ".roll over" & ".facebook" used in a single <div> container to use the properties of both the classes.

The working demo & spliced images was added for your usage and you can obtain it here Download 

Do check the Image hover effects collection for lots of cool hover effects using simple CSS and HTML.
Like this article? Share this with others through social sites and don't forget to follow us. Post your comments and queries regarding this article below. Thank you for visiting & Happy Designing.
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 215

Trending Articles