Hello Guys, In this article or video we will see Amazing Social Share Buttons Hover Effect Using Only HTML & CSS. You will use this Amazing Social Share Buttons on your website freely. If you learn How to Create this Amazing Social Share Buttons so watch my video from YouTube or bellow. And you wish to learn more amazing HTML, CSS and JavaScript Effect or Tutorial so Subscribe my YouTube Channel Pure Coding and Stay with this website.
Watch Video
--------------------
Source Code
--------------------
First add this code on index.html file:
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/
4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Amazing Social Share Hover Effect - Pure Coding</title>
</head>
<body>
<div class="wrapper">
<div class="social-icons">
<a href="#"><i class="fa fa-facebook-f"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-google-plus"></i></a>
<a href="#"><i class="fa fa-instagram"></i></a>
</div>
</div>
</body>
</html>
Then add this code on style.css file:
CSS:
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,
200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600
;1,700;1,800;1,900&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body {
width: 100%;
min-height: 100vh;
background: royalblue;
display: grid;
place-items: center;
}
.wrapper {
width: 250px;
height: 60px;
background: #FFF;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0, 0, 0, .3);
position: relative;
cursor: pointer;
overflow: hidden;
}
.wrapper::before {
content: "Share";
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 5px;
font-weight: 600;
font-size: 1.5rem;
color: royalblue;
display: grid;
place-items: center;
transition: .4s;
}
.wrapper:hover::before {
left: -100%;
}
.wrapper .social-icons {
width: 100%;
height: 100%;
display: flex;
justify-content: space-evenly;
align-items: center;
position: absolute;
top: 0;
right: -100%;
transition: .4s;
}
.wrapper:hover .social-icons {
right: 0;
}
.wrapper .social-icons a {
font-size: 1rem;
color: royalblue;
transition: .3s;
}
.wrapper .social-icons a:hover {
transform: scale(1.2);
}