Hover Background Gradient Animated Button #135

CSS Hover background gradient color animated button

Adding these style CSS buttons to your website is easier than you think. Simply copy and paste the CSS code provided with each button design into your stylesheet

Preview Button Style

You can view the default style of buttons, the disabled state mode style of buttons, and the full-width block style of the button here. Some buttons style may not display in full width format

Button style

Disabled style

Full width block style

Button Source Code HTML and CSS

Click the button below to download the source code or edit it live.
To copy this click on the icon at the top right of the code box
Button HTML
<button class="btn-135">Button 135</button>
Button CSS
.btn-135 {
    padding: 12px 28px;
    font-size: 17px;
    font-weight: bold;
    color: #fff;
    background-color: #326ded;
    border: none;
    border-radius: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-family: Arial, Helvetica, sans-serif;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.btn-135:before,
.btn-135:after {
    content: "";
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

.btn-135:before {
    left: -100%;
    background: linear-gradient(90deg, rgba(0, 136, 255, 0.8), #00ffec, rgba(0, 136, 255, 0.8));
    z-index: -1;
}

.btn-135:hover:before {
    left: 0;
}

.btn-135:after {
    right: -100%;
    background: linear-gradient(270deg, rgba(0, 136, 255, 0.8), #00ffec, rgba(0, 136, 255, 0.8));
    z-index: -1;
}

.btn-135:hover:after {
    right: 0;
}

.btn-135:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-135:active {
    transform: translateY(1px);
    box-shadow: none;
}

/*** disabled style ***/
.btn-135:disabled {
    pointer-events: none;
    opacity: .65;
    color: #7e7e7e;
    background: #dcdcdc;
    text-shadow: none;
    box-shadow: none;
}