Simple social icons for website | Sanwebcorner

Simple social icons for website

This is one of the simple way to add social icons in websites with hover effects



Social media icons is one the important thing for websites, Now a days all websites having social media pages for improve our website visitors. Then only the site should be popular. And also articles also sharing through the social media. site pages has turned out to be imperative for brand achievement nowadays.

social sharing adoration for an article which inturn increment your transformation particularly when the activity is from Facebook, Google plus and so on.

Now we will see how to implement this simple social media icons to the website and how to link the social link the social icons.

.foo img:last-child{display:none}
.foo:hover img:first-child{display:none}
.foo:hover img:last-child{display:inline-block}
.foo img{float:right; margin-left:5px;}


This simple css used to display the social icons and on hover hide the corresponding icon and display the hover icons. Then link the corresponding social media icons links using <a> tag


Html code for Social icons


<html>
<head>
<title>hover social icon</title>
<style>
.foo img:last-child{display:none}
.foo:hover img:first-child{display:none}
.foo:hover img:last-child{display:inline-block}
.foo img{float:right; margin-left:5px;}
</style>
</head>
<body>

    <a class="foo" href="#"><img src="youtube.png" /><img src="youtube-hover.png" /></a>
    <a class="foo" href="#"><img src="google.png" /><img src="google-hover.png" /></a>
    <a class="foo" href="#"><img src="twitter.png" /><img src="twitter-hover.png" /></a>
    <a class="foo" href="#"><img src="fb.png" /><img src="fb-hover.png" /></a>
</body>
</html>