Hover Button Effects

 

<!DOCTYPE html>
<html>
<head>
<title>Hover Button Effects</title>
</head>
<body>
<a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
Buttons
</a>
</body>
</html>
<style type="text/css">
*{
margin: 0px;
padding: 0px;
box-sizing: border-box;
font-family: arial;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #1f242d;
}
a{
position: relative;
display: inline-block;
padding: 10px 30px;
text-decoration: none;
text-transform: uppercase;
color: rgba(255,255,255, 0.4);
background: #262c37;
letter-spacing: 2px;
font-size: 16px;
transition: 0.5s;
}
a:hover{
color: rgba(255, 255, 255, 1);
}
a span{
display: block;
position: absolute;
background: #2894ff;
}
a span:nth-child(1){
left: 0px;
bottom: 0px;
width: 1px;
height: 100%;
transform: scaleY(0);
transform-origin: top;
transition: transform 0.5s;
}
a:hover span:nth-child(1){
transform: scaleY(1);
transform-origin: bottom;
transition: transform 0.5s;
}
a span:nth-child(2){
left: 0px;
bottom: 0px;
width: 100%;
height: 1px;
transform: scaleX(0);
transform-origin: right;
transition: transform 0.5s;
}
a:hover span:nth-child(2){
transform: scaleX(1);
transform-origin: left;
transition: transform 0.5s;
}
a span:nth-child(3){
right: 0px;
bottom: 0px;
width: 1px;
height: 100%;
transform: scaleY(0);
transform-origin: top;
transition: transform 0.5s;
}
a:hover span:nth-child(3){
transform: scaleY(1);
transform-origin: left;
transition: transform 0.5s;
}
a span:nth-child(4){
right: 0px;
top: 0px;
width: 100%;
height: 1px;
transform: scaleX(0);
transform-origin: right;
transition: transform 0.5s;
}
a:hover span:nth-child(4){
transform: scaleX(1);
transform-origin: left;
transition: transform 0.5s;
}
</style>


Comments

Popular posts from this blog

Right click disable

Moutain

Input Placeholder