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

Zöld függöny

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

Élő előnézet
HTML · CSS · JS
HTML
<button class="we-btn-curtain" type="button">
    <span class="we-btn-curtain-left"></span>
    <span class="we-btn-curtain-right"></span>

    <span class="we-btn-curtain-text">Megnézem</span>
    <span class="we-btn-curtain-arrow">→</span>
</button>
CSS
.we-btn-curtain {
    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(63,159,99,.3);
    border-radius: 12px;

    background: #101713;
    color: #f1f3ee;

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

    cursor: pointer;
    overflow: hidden;

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

.we-btn-curtain-left,
.we-btn-curtain-right {
    position: absolute;

    top: 0;

    width: 50%;
    height: 100%;

    background: #3f9f63;

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

.we-btn-curtain-left {
    left: 0;

    transform-origin: left center;
    transform: translateX(-102%);
}

.we-btn-curtain-right {
    right: 0;

    transform-origin: right center;
    transform: translateX(102%);
}

.we-btn-curtain-text,
.we-btn-curtain-arrow {
    position: relative;
    z-index: 3;

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

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

.we-btn-curtain:hover {
    transform:
        translateY(-5px);

    border-radius: 18px;

    box-shadow:
        0 24px 46px rgba(0,0,0,.44);
}

.we-btn-curtain:hover .we-btn-curtain-left {
    transform: translateX(0);
}

.we-btn-curtain:hover .we-btn-curtain-right {
    transform: translateX(0);
}

.we-btn-curtain:hover .we-btn-curtain-text {
    color: #08110b;

    transform:
        translateX(-4px);
}

.we-btn-curtain:hover .we-btn-curtain-arrow {
    color: #08110b;

    transform:
        translateX(8px)
        scale(1.12);
}

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