Let's Enjoy Do Download Free Code and Make Something Creative
HTML FILE
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>CSS3 Button <span>Hover</span></h1>
<div class="button-effect">
<h2>Efffect 1</h2>
<a href="#" class="effect effect-1">Button</a>
<a href="#" class="effect effect-1">Button</a>
<a href="#" class="effect effect-1">Button</a>
<a href="#" class="effect effect-1">Button</a>
</div>
<div class="button-effect">
<h2>Efffect 2</h2>
<a href="#" class="effect effect-2">Button</a>
<a href="#" class="effect effect-2">Button</a>
<a href="#" class="effect effect-2">Button</a>
<a href="#" class="effect effect-2">Button</a>
</div>
<div class="button-effect">
<h2>Efffect 3</h2>
<a href="#" class="effect effect-3">Button</a>
<a href="#" class="effect effect-3">Button</a>
<a href="#" class="effect effect-3">Button</a>
<a href="#" class="effect effect-3">Button</a>
</div>
<div class="button-effect">
<h2>Efffect 4</h2>
<a href="#" class="effect effect-4">Button</a>
<a href="#" class="effect effect-4">Button</a>
<a href="#" class="effect effect-4">Button</a>
<a href="#" class="effect effect-4">Button</a>
</div>
<div class="button-effect">
<h2>Efffect 5</h2>
<a href="#" class="effect effect-5">Button</a>
<a href="#" class="effect effect-5">Button</a>
<a href="#" class="effect effect-5">Button</a>
<a href="#" class="effect effect-5">Button</a>
</div>
</div>
</body>
</html>
CSS FILE
body{
background-color: rgb(245, 245, 245);
}
body .container{
width: 850px;
margin: 70px auto 0px auto;
text-align: center;
}
body .container h1{
font-family:fantasy;
font-weight: 400;
font-size: 30px;
font-style: normal;
margin-bottom: 30px;
}
body .container h1 span {
font-weight: 700;
font-style: italic;
color: #d90368;
border-bottom: 2px dashed currentColor;
}
body .container .button-effect {
padding: 30px 0px;
}
body .container .button-effect h2 {
font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
text-transform: uppercase;
font-size: 20px;
margin-bottom: 40px;
font-weight: 500;
}
body .container .button-effect a {
margin-right: 17px;
}
body .container .button-effect a:nth-child(2){
background-color: red;
}
body .container .button-effect a:nth-child(3){
background-color: #f28123;
}
body .container .button-effect a:nth-child(4){
background-color: #541388;
}
body .container .button-effect a:nth-child(5){
background-color:green;
}
body .container .button-effect a:last-child{
margin-right: 0px;
}
.effect {
text-align: center;
display: inline-block;
position: relative;
text-decoration: none;
color: #FFF;
text-transform: uppercase;
font-family: "Roboto" sans-serif;
font-size: 18px;
padding: 20px 0px;
width: 150px;
border-radius: 10px;
overflow: hidden;
}
.effect.effect-1{
transition: all 0.2s linear 0s;
}
.effect.effect-1::before{
content: "";
font-family: FontAwesome;
font-size: 15px;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
right: 0;
top: 0;
opacity: 0;
height: 100%;
width: 40px;
transition: all 0.2s linear 0s;
}
.effect.effect-1:hover {
text-indent: -20px;
}
.effect.effect-1:hover::before {
opacity: 1;
text-indent: 0px;
}
.effect.effect-2 {
transition: all 0.2s linear 0s;
}
.effect.effect-2:before {
content: "";
font-family: FontAwesome;
font-size: 15px;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
right: -30px;
width: 30px;
height: 100%;
background-color: rgba(255, 255, 255, 0.3);
border-radius: 0px 6px 6px 0px;
transition: all 0.2s linear 0s;
text-align: center;
}
.effect.effect-2:hover {
text-indent: -30px;
}
.effect.effect-2:hover:before {
right: 0;
text-indent: 0px;
}
/* effect-3 styles */
.effect.effect-3 {
transition: all 0.2s linear 0s;
}
.effect.effect-3:before {
content: "";
font-family: FontAwesome;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 100%;
left: 0px;
width: 100%;
height: 100%;
text-align: center;
font-size: 30px;
transition: all 0.2s linear 0s;
}
.effect.effect-3:hover {
text-indent: -9999px;
}
.effect.effect-3:hover:before {
top: 0;
text-indent: 0;
}
/* effect-4 styles */
.effect.effect-4 {
transition: all 0.2s linear 0s;
}
.effect.effect-4:before {
content: "";
font-family: FontAwesome;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
left: 0px;
width: 100%;
height: 100%;
text-align: center;
font-size: 30px;
transform: scale(0, 1);
transition: all 0.2s linear 0s;
}
.effect.effect-4:hover {
text-indent: -9999px;
}
.effect.effect-4:hover:before {
transform: scale(1, 1);
text-indent: 0;
}
/* effect-5 styles */
.effect.effect-5 {
transition: all 0.2s linear 0s;
}
.effect.effect-5:before {
content: "";
font-family: FontAwesome;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
left: 0px;
height: 100%;
width: 30px;
background-color: rgba(255, 255, 255, 0.3);
border-radius: 0 50% 50% 0;
transform: scale(0, 1);
transform-origin: left center;
transition: all 0.2s linear 0s;
}
.effect.effect-5:hover {
text-indent: 30px;
}
.effect.effect-5:hover:before {
transform: scale(1, 1);
text-indent: 0;
}


0 Comments