
how to create a Creative Button Hover
Before We Start
Every developers need, clean and modern elements to develop their websites, It contain pictures and a user interface element within a website. The most important one and the first section that the user sees when he/she enters a website. how to create a Creative Button Hover
So if you are a person who wishes to develop a website, you have to know how to create that properly.

how to create a Creative Button Hover
We are here to solve your problem. In this article we discuss how to create this elements. Before we start please read the below articles which easier you to understand the process, if you are new to development.
Step 1 – Add HTML
It’s too easy and simple. Just copy and paste below code in your HTML editor between <body> </body> tag.
<html>
<div class="center">
<div class="btn-1">
<p>Button 1: </p>
<a href=""><span>Hover over me</span></a>
</div>
<div class="btn-2">
<p>Button 2: </p>
<a href=""><span>Hover over me</span></a>
</div>
</div>
</html>
Step 2 – Add CSS
Copy and paste below code in your HTML editor between <style></style> tag.
<style>
body {
background: rgb(131, 58, 180);
background: linear-gradient(
90deg,
rgba(131, 58, 180, 1) 0%,
rgba(253, 29, 29, 1) 100%,
rgba(252, 176, 69, 1) 100%
);
font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
color: #c2c2c2;
}
.center {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
font-size: 24px;
}
.btn-1,
.btn-2 {
width: 300px;
height: 200px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
/* Created by http://grohit.com/ */
footer a,
.btn-1 a,
.btn-2 a {
text-decoration: none;
border: 2px solid #010100;
padding: 15px;
color: #000;
text-transform: uppercase;
letter-spacing: 2px;
position: relative;
display: inline-block;
}
span {
position: relative;
/* z-index coz when we put bg to before and after this span text will not be visible */
z-index: 3;
}
/* Button 1 styles */
.btn-1 a::before {
content: "";
position: absolute;
top: 5px;
left: -2px;
width: calc(100% + 6px);
/*100% plus double the times left values*/
height: calc(100% - 10px);
background-color: #ffffff;
transition: all 0.5s ease-in-out;
transform: scaleY(1);
}
.btn-1 a:hover::before,
.btn-2 a:hover::before {
transform: scaleY(0);
}
.btn-1 a::after {
content: "";
position: absolute;
left: 5px;
top: -5px;
width: calc(100% - 10px);
/*100% plus double the times left values*/
height: calc(100% + 10px);
background-color: #ffffff;
transition: all 0.5s ease-in-out;
transform: scaleX(1);
}
/* Created by http://grohit.com/ */
.btn-1 a:hover::after,
.btn-2 a:hover::after {
transform: scaleX(0);
}
/* Button 2 styles */
.btn-2 a {
color: #ffffff;
transition: all 0.5s ease-in-out;
}
.btn-2 a:hover {
color: #000000;
transition: all 0.5s ease-in-out;
}
.btn-2 a::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #000;
transition: all 0.5s ease-in-out;
transform: scaleY(1);
}
.btn-2 a::after {
content: "";
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: black;
transition: all 0.5s ease-in-out;
transform: scaleX(1);
}
/* Created by http://grohit.com/ */
footer {
text-align: center;
font-size: 10px;
}
</style>
At the end we will have something like this. You can change fonts, colors, backgrounds and all things that you want. Enjoy it.

Video Tutorial
Please watch this video to better understand this tutorial and don’t forget to subscribe to our channel.
Help others to find out about this article on Social Media sites. If you have any doubt or any problem, don’t hesitate to contact us. Thereafter we will be able to help you and also make sure you bookmark our site on your browser.