HEY CODER,
In this we are going to Create hover buttons using HTML CSS JS (SOURCE CODE AVAILIABLE)
PREVIEW
SOURCE CODE
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@codewith_muhilan</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<style>
* {
margin: 0;
padding: 0;
}
html,
css {
width: 100%;
height: 100%;
}
.position {
margin-left: auto;
margin-right: auto;
text-align: center;
margin-top: 15%;
}
#workarea {
position: absolute;
width: 100%;
height: 100%;
background-color: #000;
font-family: Raleway;
}
.spot {
position: absolute;
width: 100%;
height: 100%;
top: 0; left: 0;
}
.svg-wrapper {
margin-top: 0;
position: relative;
width: 150px;
height: 40px;
display: inline-block;
border-radius: 3px;
margin-left: 5px;
margin-right: 5px
}
#shape {
stroke-width: 6px;
fill: transparent;
stroke: #06D6A0;
stroke-dasharray: 85 400;
stroke-dashoffset: -220;
transition: 1s all ease;
}
#text {
margin-top: -35px;
text-align: center;
}
#text a {
color: white;
text-decoration: none;
font-weight: 100;
font-size: 1.1em;
}
.svg-wrapper:hover #shape {
stroke-dasharray: 50 0;
stroke-width: 3px;
stroke-dashoffset: 0;
stroke: #00fffc;
}
/* -- YouTube Link Styles -- */
#source-link {
top: 60px;
}
#source-link>i {
color: rgb(94, 106, 210);
}
#yt-link {
top: 10px;
}
#yt-link>i {
color: rgb(219, 31, 106);
}
.meta-link {
align-items: center;
backdrop-filter: blur(3px);
background-color: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 6px;
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
cursor: pointer;
display: inline-flex;
gap: 5px;
left: 10px;
padding: 10px 20px;
position: fixed;
text-decoration: none;
transition: background-color 600ms, border-color 600ms;
z-index: 10000;
}
.meta-link:hover {
background-color: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.meta-link>i,
.meta-link>span {
height: 20px;
line-height: 20px;
}
.meta-link>span {
color: white;
font-family: "Rubik", sans-serif;
transition: color 600ms;
}
</style>
</head>
<body>
<div id="workarea">
<div class="position">
<div class="svg-wrapper">
<svg height="40" width="150" xmlns="http://www.w3.org/2000/svg">
<rect id="shape" height="40" width="150" />
<div id="text">
<a href=""><span class="spot"></span>Like</a>
</div>
</svg>
</div>
<!--Next button -->
<div class="svg-wrapper">
<svg height="40" width="150" xmlns="http://www.w3.org/2000/svg">
<rect id="shape" height="40" width="150" />
<div id="text">
<a href=""><span class="spot"></span>Share</a>
</div>
</svg>
</div>
<!--Next button -->
<div class="svg-wrapper">
<svg height="40" width="150" xmlns="http://www.w3.org/2000/svg">
<rect id="shape" height="40" width="150" />
<div id="text">
<a href=""><span class="spot"></span>Follow</a>
</div>
</svg>
</div>
<!--End button -->
<!--Social Liks codings below-->
<a id="source-link" class="meta-link" href="https://t.me/+7yc_oGHnLJhlOWVl" target="_blank">
<i class="fas fa-link"></i>
<span class="roboto-mono">Join my Telegram</span>
</a>
<a id="yt-link" class="meta-link" href="https://www.youtube.com/@codewith_muhilan?sub_confirmation=1" target="_blank">
<i class="fab fa-youtube"></i>
<span>Subscribe my channel..❤</span>
</a>
</body>
</html>