<!-- -------------- Created By InCoder -------------- -->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Awesome Neumorphism Social Icon Button with Tooltip - InCoder</title>
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
</head>
<body>
<div class="container">
<div class="social-icons">
<a href="#" class="icon" data-tooltip="Facebook">
<i class="fab fa-facebook"></i>
</a>
<a href="#" class="icon" data-tooltip="Whatsapp">
<i class="fab fa-whatsapp"></i>
</a>
<a href="#" class="icon" data-tooltip="Instagram">
<i class="fab fa-instagram"></i>
</a>
<a href="#" class="icon" data-tooltip="Linked In">
<i class="fab fa-twitter"></i>
</a>
</div>
</div>
</body>
</html>
/* -------------- Created By InCoder -------------- */
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: #7c7c7c2e;
}
.social-icons {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
}
.icon {
width: 4rem;
height: 4rem;
margin: 2rem;
display: flex;
color: #202020;
font-size: 1.5rem;
border-radius: 50%;
position: relative;
align-items: center;
text-decoration: none;
justify-content: center;
background-color: #ececec;
box-shadow: 10px 10px 15px #c7c4c4, -10px -10px 15px #fff;
}
.icon:hover {
box-shadow: inset 5px 5px 5px #c7c4c4, inset -5px -5px 5px #fff;
}
.fa-facebook {
color: #1877f2;
}
.fa-whatsapp {
color: #25d366;
}
.fa-instagram {
color: #e1306c;
}
.fa-twitter {
color: #1da1f2;
}
.icon::after {
content: attr(data-tooltip);
position: absolute;
height: auto;
width: auto;
padding: 10px 20px;
color: #fff;
font-size: 1rem;
top: -90%;
left: -25%;
opacity: 0;
pointer-events: none;
border-radius: 5px;
transform: translateY(30px);
transition: transform 0.2s;
font-family: "Poppins", sans-serif;
}
.icon::before {
content: "";
position: absolute;
height: 1rem;
width: 1rem;
top: -12%;
left: calc(125% - 19px);
z-index: 1;
opacity: 0;
transition: transform 0.2s;
transform: translateY(30px);
}
.icon:hover::after {
opacity: 1;
transform: translateY(0px);
}
.icon:hover::before {
opacity: 0.7;
top: -35%;
left: calc(70% - 19px);
transform: rotate(45deg) translateY(0px);
}
.icon:nth-child(1)::after {
left: -40% !important;
background-color: #1877f2;
}
.icon:nth-child(1)::before {
background-color: #1877f2;
}
.icon:nth-child(2)::after {
left: -45% !important;
background-color: #25d366;
}
.icon:nth-child(2)::before {
background-color: #25d366;
}
.icon:nth-child(3)::after {
left: -42% !important;
background-color: #e1306c;
}
.icon:nth-child(3)::before {
background-color: #e1306c;
}
.icon:nth-child(4)::after {
left: -32% !important;
background-color: #1da1f2;
}
.icon:nth-child(4)::before {
background-color: #1da1f2;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.