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

Zöld gyűrűből kibomló

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

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

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

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

    padding: 0 27px;

    border: 1px solid rgba(63,159,99,.3);
    border-radius: 13px;

    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-ring-shape {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 16px;
    height: 16px;

    border: 3px solid #5fbd7d;
    border-radius: 50%;

    transform:
        translate(-50%, -50%)
        scale(.4);

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

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

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

.we-btn-ring-arrow {
    font-size: 20px;
    line-height: 1;
}

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

    border-radius: 18px;

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

.we-btn-ring:hover .we-btn-ring-shape {
    transform:
        translate(-50%, -50%)
        scale(13);

    border-width: 22px;
    border-radius: 38%;
}

.we-btn-ring:hover .we-btn-ring-text {
    color: #08110b;
    transform: translateX(-4px);
}

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

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

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