<head>
<meta charset="UTF-8" />
<title>Sticky Share Buttons</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<div class="sticky_share_btn">
<div class="fixed_share">
<ul class="listing">
<li class="facebook">
<a href="https://www.facebook.com/stackfindover" target="_blank">
<i class="fa fa-facebook-square"></i>
</a>
</li>
<li class="twitter">
<a href="https://twitter.com/stackfindover" target="_blank">
<i class="fa fa-twitter"></i>
</a>
</li>
<li class="pinterest">
<a href="https://in.pinterest.com/stackfindover/" target="_blank">
<i class="fa fa-pinterest"></i>
</a>
</li>
<li class="linkedin">
<a href="https://www.linkedin.com/in/stackfindover/" target="_blank">
<i class="fa fa-linkedin-square"></i>
</a>
</li>
<li class="linkedin">
<a href="http://blogs.stackfindover.com/" target="_blank">
<i class="fa fa-globe"></i>
</a>
</li>
<li class="whatsapp">
<a href="https://dev.to/stackfindover" target="_blank">
<i class="fa fa-whatsapp"></i>
</a>
</li>
</ul>
<span class="share-toggle">
<i class="fa fa-share-alt"></i>
</span>
</div>
</div>
</body>
* {
padding: 0;
margin: 0;
outline: 0;
}
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
overflow: hidden;
}
.sticky_share_btn {
position: fixed;
left: 30px;
bottom: 30px;
}
.share-toggle,
.fixed_share ul.listing > li {
font-size: 20px;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border: 2px solid;
border-radius: 50%;
transition: all 0.5s ease-in-out;
}
ul.listing {
list-style: none;
display: none;
}
.fixed_share ul.listing > li {
margin-bottom: 10px;
}
.fixed_share ul.listing > li > a {
display: block;
width: 100%;
height: auto;
text-align: center;
}
.share-toggle:hover,
.fixed_share ul.listing > li:hover {
transform: scale(1.1) rotate(360deg);
}
.fixed_share .facebook,
.fixed_share .facebook > a{
color: #4267B2;
}
.fixed_share .twitter,
.fixed_share .twitter > a{
color: #00acee;
}
.fixed_share .pinterest,
.fixed_share .pinterest > a{
color: #E60023;
}
.fixed_share .linkedin,
.fixed_share .linkedin > a{
color: #0e76a8;
}
.fixed_share .whatsapp,
.fixed_share .whatsapp > a{
color: #25D366;
}
jQuery(".sticky_share_btn").click(function () {
jQuery(".listing").fadeToggle(600);
});
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.