Animated Text Button #63

CSS Text 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-63 txt-animate-btn-63" alt="Button 63">Button 63</button>
Button CSS
.btn-63 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 15px 20px;
    font-size: 17px;
    text-transform: uppercase;
    border: 0;
    box-shadow: #c63203 0px 7px 0px 0px;
    background-color: #FF5722;
    border-radius: 12px;
    overflow: hidden;
    transition: 31ms cubic-bezier(.5, .7, .4, 1);
    font-family: Arial, Helvetica, sans-serif;
    cursor: pointer;
    text-decoration: none;
    /*** full width block ***/
    /* width: 100%; */
}

.btn-63:before {
    content: attr(alt);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    font-size: 15px;
    font-weight: bold;
    color: white;
    letter-spacing: 4px;
    opacity: 1;
}

.btn-63:active {
    box-shadow: none;
    transform: translateY(7px);
    transition: 35ms cubic-bezier(.5, .7, .4, 1);
}

.btn-63:hover:before {
    transition: all .0s;
    transform: translateY(100%);
    opacity: 0;
}

.btn-63 span {
    color: white;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 4px;
    font-style: normal;
    transition: all 2s ease;
    transform: translateY(-20px);
    opacity: 0;
    display: inline-block;
}

.btn-63:hover span {
    transition: all .2s ease;
    transform: translateY(0px);
    opacity: 1;
    transition-delay: var(--i_63);
}

.btn-63:disabled {
    pointer-events: none;
    opacity: .65;
    color: #7e7e7e;
    background: #dcdcdc;
    box-shadow: none;
}
Button javaScript
(() => {
    const buttons = document.querySelectorAll('.txt-animate-btn-63');
    buttons.forEach(button => {
        const button_text = button.textContent.trim().split('');
        let div = [];
        let i = 1;
        button_text.forEach(text => {
            text = text == " " ? "&nbsp;" : text;
            div.push('<span style="--i_63:' + (i / 20) + 's">' + text + '</span>');
            i++;
        });
        button.innerHTML = div.join('');
    });
})();