Vissza az animációkhoz
Gombanimációk

Elcsúszó keret

Élő előnézet – az animáció teljes méretben.

Élő előnézet
HTML · CSS · JS
HTML
<button class="we-btn-slideframe" type="button">
    <span class="we-btn-slideframe-top"></span>
    <span class="we-btn-slideframe-bottom"></span>
    <span class="we-btn-slideframe-text">Megnézem</span>
    <span class="we-btn-slideframe-arrow">→</span>
</button>
CSS
.we-btn-slideframe {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;

    min-width: 180px;
    height: 54px;

    padding: 0 26px;

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;

    background: #101713;
    color: #f1f3ee;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .4px;

    cursor: pointer;
    overflow: hidden;

    transition:
        transform .7s cubic-bezier(.22,1,.36,1),
        border-radius .7s ease,
        box-shadow .7s ease;
}

.we-btn-slideframe-top,
.we-btn-slideframe-bottom {
    position: absolute;

    left: 10%;
    width: 80%;
    height: 2px;

    background: #3f9f63;

    transition:
        transform 1s cubic-bezier(.22,1,.36,1),
        width 1s cubic-bezier(.22,1,.36,1);
}

.we-btn-slideframe-top {
    top: 5px;
}

.we-btn-slideframe-bottom {
    bottom: 5px;
}

.we-btn-slideframe-text,
.we-btn-slideframe-arrow {
    position: relative;
    z-index: 2;

    transition:
        transform .8s cubic-bezier(.22,1,.36,1),
        color .6s ease;
}

.we-btn-slideframe-arrow {
    font-size: 20px;
}

.we-btn-slideframe:hover {
    transform:
        translateY(-4px);

    border-radius: 16px;

    box-shadow:
        0 20px 42px rgba(0,0,0,.4);
}

.we-btn-slideframe:hover .we-btn-slideframe-top {
    width: 100%;

    transform:
        translateX(12%);
}

.we-btn-slideframe:hover .we-btn-slideframe-bottom {
    width: 100%;

    transform:
        translateX(-12%);
}

.we-btn-slideframe:hover .we-btn-slideframe-text {
    transform:
        translateX(-4px);

    color: #9bd5a9;
}

.we-btn-slideframe:hover .we-btn-slideframe-arrow {
    transform:
        translateX(8px)
        scale(1.12);

    color: #5fbd7d;
}

.we-btn-slideframe:active {
    transform:
        translateY(-1px)
        scale(.97);
}
JavaScript
Ehhez az animációhoz nincs külön JavaScript.