JSFiddle - React, Tailwind, and code Playground
by Anav02
HTML
<!DOCTYPE html>
<html>
<head>
<title>Creative Social Icons</title>
</head>
<body>
<section >
<div class="socials">
<span><p>Instagram</p></span>
<span><p>Facebook</p></span>
<span><p>YouTube</p></span>
<span><p>Twitch</p></span>
<span><p>TikTok</p></span>
</div>
</body>
</html>
CSS
* {
padding: 0;
margin: 0;
}
body {
background-color:#282A30;
}
section {
margin:auto;
height: 100vh;
width: 90vw;
display: flex;
flex-direction: column;
justify-content: space-evenly;
}
.socials {
margin: auto;
}
.socials span{
display: inline-flex;
height:30px;
width: 30px;
background-color: white;
justify-content: center;
align-items: center;
border-radius: 50%;
font-size: 1rem;
margin: 0 10px;
transition: all .3s ease;
cursor: pointer;
color: white;
box-shadow: rgba(42, 42, 42, 0.3) 0px 7px 29px 0px;
position: relative;
border: 2px solid white;
}
.socials span p{
position:absolute;
transform: translateY(50px);
rotate: 90deg;
pointer-events: none;
transition: all .3s ease;
opacity: 0;
font-size: 1rem;
padding: 5px;
border-radius: 10px;
box-shadow: rgba(42, 42, 42, 0.3) 0px 7px 29px 0px;
color: black;
}
.socials span:hover p{
position:absolute;
transform: translateY(50px);
rotate: 0deg;
background-color:white;
opacity: 1;
}
.socials:hover span{
opacity: .2;
}
.socials span:hover{
opacity: 1;
}
.socials span:nth-child(1) {
background: #f09433;
background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}
.socials span:nth-child(2) {
background: #3b5998 ;
}
.socials span:nth-child(3) {
background: #FF0000 ;
}
.socials span:nth-child(4) {
background: #6441a5 ;
}
.socials span:nth-child(5) {
background: linear-gradient(45deg, #FE2C55 0%,#25F4EE 100%);
}
.socials span:nth-child(6) {
background: #00acee ;
}