Home Buttons Animated gradient buttons on hover HTML and CSS

Animated gradient buttons on hover HTML and CSS

793
0

How to create Animated gradient buttons on hover HTML and CSS in simple video tutorials

HTML

<div class="box">
    <button class="btn btn-1">Hover Me</button>
    <button class="btn btn-2">Hover Me</button>
    <button class="btn btn-1">Hover Me</button>
    <button class="btn btn-2">Hover Me</button>
  </div>

CSS

body{
    margin: 0;
    padding: 0;
    background: #000000;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn{
    display: block;
    margin: 40px 0;
    padding: 20px 30px;
    border: none;
    border-radius: 60px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 18px;
    color: #ffffff;
    cursor: pointer;
    background-size: 200%;  
    transition: 0.6s;
}

.btn-1{
    background-image: linear-gradient(to right,
     #3e64ff,#eb3b5a,#3e64ff);
}

.btn-2{
    background-image: linear-gradient(to right, 
    #3e64ff, #ffffff, #3e64ff)
}

.btn:hover{
    background-position: right;
}

(Visited 169 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here