Let your blog readers to show their love by sharing your blog post with friends and connection on social networking sites. In this tutorial we will see how to add
CSS animated share buttons on blogger which contains 4 social media share buttons/icon (Facebook, Twitter, Google+ and
Pinterest) with cool hover effect. Also you can replace the social networks by changing the links provided below.
Also see: Flipper Social Sharing Widget for Blogger
How to Add CSS Animated Share Buttons on Blogger?
Step 1: Go to
Blogger Dashboard> Template > Edit HTMLStep 2: Press CTRL + F to enable search box, and search for
]]></b:skin>
tag.
Step 3: Just above
]]></b:skin>
add following code.
.share_button {
width: 300px;
height: 50px;
margin: 10px auto;
}
.share_button ul {
width: 50%;
height: inherit;
float: left;
list-style: none;
margin: 0 !important;
padding: 0 !important;
}
.share_button ul h1 {
margin-top: 9%;
overflow: hidden;
width: 100%;
color: #4889F0;
font-size: 18px;
text-shadow:2px 2px 2px #fff;
}
.share_button ul li {
position: absolute;
height: inherit;
width: 150px;
margin: 0 !important;
padding: 0 !important;
background: #EEEEEE;
-webkit-transition: all 600ms;
-moz-transition: all 600ms;
-o-transition: all 600ms;
-ms-transition: all 600ms;
transition: all 600ms;
text-align: center;
}
.share_button ul li h2 {
display: inline-block;
width: 32%;
height: 40px;
overflow: hidden;
margin-top: 5%;
cursor: pointer;
border: 0 !important;
}
.share_button ul:first-child li:first-child{
text-align: right;
}
.share_button ul:last-child li:first-child{
text-align: left;
}
.share_button ul:first-child li:last-child,
.share_button:hover ul:first-child li:first-child {
-webkit-transform: rotateY(90deg);
-moz-transform: rotateY(90deg);
-o-transform: rotateY(90deg);
-ms-transform: rotateY(90deg);
transform: rotateY(90deg);
}
.share_button ul:last-child li:last-child,
.share_button:hover ul:last-child li:first-child {
-webkit-transform: rotateY(-90deg);
-moz-transform: rotateY(-90deg);
-o-transform: rotateY(-90deg);
-ms-transform: rotateY(-90deg);
transform: rotateY(-90deg);
}
.share_button:hover ul:first-child li:last-child,
.share_button:hover ul:last-child li:last-child {
-webkit-transform: rotateY(0deg);
-moz-transform: rotateY(0deg);
-o-transform: rotateY(0deg);
-ms-transform: rotateY(0deg);
transform: rotateY(0deg);
}
Step 4: Next, Search for the
<div class='post-footer'>
- find the second
<div class='post-footer'>
and paste the following code just above it:
<div class='share_button'>
<ul>
<li><h1>
Share t
</h1></li>
<li><h2>
<a expr:href='"http://www.facebook.com/sharer.php?u=" + data:post.canonicalUrl + "&t=" + data:post.title ' title='Share on Facebook'><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh7zDfRb2lbNMMFAEVR5jqHCNmVvuQA3Qbdjsn7PyW0-0_HHXyNqsOROh6tOSsbAPuHbzdhv3-wsF8DsJ6U0OHMaIvoKxAkRodAuF9wIqqQRfTPrL-0qr5OOzGD_Y3lmyrziN8_UyFBbwv/s1600/Facebook.png"/></a></h2>
<h2><a expr:href='"http://twitter.com/home?status=" + data:post.title + " " + data:post.canonicalUrl ' title='Share on Twitter'><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpob50xkpCzWdtZF7VSHi3ckL6PsJUiWavgFzD1m5AZ-7F0UIw7GpJSWpULNKd_shXGgd-lmzh_2u3hruOhCbVCdnE4T8GRHf_5llIlxDnRic3pgdlSe5lOZ1MuxHx7aUDPDWVhJCFiBRP/s1600/Twitter.png"/></a></h2>
</li>
</ul>
<ul>
<li><h1>his page</h1></li>
<li>
<h2><a expr:href='"https://plus.google.com/share?url=" + data:post.canonicalUrl ' title='Share on Google Plus'><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipVgiOcCPGRyfS1jQCnK_31TvlzKYmdZMr69XdiweVQfzonRko9B-tLTCIUhMMJG5v00pGUjzLUVzOtxdQBJNJS_sPwiI7d3x_ULPgEN7IJtqJo8i444L3tUDpRrXMzipdU-hWakfLvrSV/s1600/Google-plus.png"/></a></h2>
<h2>
<a href='javascript:void((function(){var%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());' title='Share on Pinterest'><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq-6FuyrOW2GuvlEY_VWqGHryVNaCWCwYlh0o3t66OILw1xLMBxjZJ30_x38cO2veAEU-yWK23pe60rOF4YJ4szb6-yrwik0UOftaEBbfH7lYg95ZtP_K_jiUiJAbp-cdKSuto6-yMAKUQ/s1600/Pinterest.png"/></a>
</h2>
</li>
</ul>
</div>
Note: if you want to change the icons, replace the URLs in blue.
Step 5: Click on the Save template button and we're done! Enjoy ;)