logo

Social Media Icons

 

Lien d’origine: https://codepen.io/abdelrhmansaid/pen/OJRNOpQ

HTML:

 

<center><section class="social-media-icons">
<div class="columns wrapper">
<div class="column icon twitter">
<div class="tooltip">Twitter</div>
<span><i class="fab fa-twitter"></i></span>
</div>
<div class="column icon facebook">
<div class="tooltip">Facebook</div>
<span><i class="fab fa-facebook-f"></i></span>
</div>
<div class="column icon youtube">
<div class="tooltip">Youtube</div>
<span><i class="fab fa-youtube"></i></span>
</div>
<div class="column icon whatsapp">
<div class="tooltip">WhatsApp</div>
<span><i class="fab fa-whatsapp"></i></span>
</div>
<div class="column icon pinterest">
<div class="tooltip">Pinterest</div>
<span><i class="fab fa-pinterest"></i></span>
</div>
<div class="column icon mail">
<div class="tooltip">Mail</div>
<span><i class="fa fa-envelope"></i></span>
</div>
</div>
</section></center>

CSS:

 

.social-media-icons .wrapper {
display: inline-flex;
margin:7px;
}
.social-media-icons .wrapper .icon {
position: relative;
background-color: #ffffff;
border-radius: 50%;
padding: 15px;
margin: 10px;
width: 50px;
height: 50px;
font-size: 18px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
cursor: pointer;
transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.social-media-icons .wrapper .tooltip {
position: absolute;
top: 0;
font-size: 14px;
background-color: #ffffff;
color: #ffffff;
padding: 5px 8px;
border-radius: 5px;
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
opacity: 0;
pointer-events: none;
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.social-media-icons .wrapper .tooltip::before {
position: absolute;
content: "";
height: 8px;
width: 8px;
background-color: #ffffff;
bottom: -3px;
left: 50%;
transform: translate(-50%) rotate(45deg);
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.social-media-icons .wrapper .icon:hover .tooltip {
top: -45px;
opacity: 1;
visibility: visible;
pointer-events: auto;
}
.social-media-icons .wrapper .icon:hover span,
.social-media-icons .wrapper .icon:hover .tooltip {
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1);
}
.social-media-icons .wrapper .facebook:hover,
.social-media-icons .wrapper .facebook:hover .tooltip,
.social-media-icons .wrapper .facebook:hover .tooltip::before {
background-color: #3b5999;
color: #ffffff;
}
.social-media-icons .wrapper .twitter:hover,
.social-media-icons .wrapper .twitter:hover .tooltip,
.social-media-icons .wrapper .twitter:hover .tooltip::before {
background-color: #46c1f6;
color: #ffffff;
}
.social-media-icons .wrapper .youtube:hover,
.social-media-icons .wrapper .youtube:hover .tooltip,
.social-media-icons .wrapper .youtube:hover .tooltip::before {
background-color: #de463b;
color: #ffffff;
}
.social-media-icons .wrapper .whatsapp:hover,
.social-media-icons .wrapper .whatsapp:hover .tooltip,
.social-media-icons .wrapper .whatsapp:hover .tooltip::before {
background-color: #45f76b;
color: #ffffff;
}
.social-media-icons .wrapper .pinterest:hover,
.social-media-icons .wrapper .pinterest:hover .tooltip,
.social-media-icons .wrapper .pinterest:hover .tooltip::before {
background-color: #e10124;
color: #ffffff;
}
.social-media-icons .wrapper .mail:hover,
.social-media-icons .wrapper .mail:hover .tooltip,
.social-media-icons .wrapper .mail:hover .tooltip::before {
background-color: #1772f2;
color: #ffffff;
}