Gombanimációk
Kettéhasadó zöld felület
Élő előnézet – az animáció teljes méretben.
Élő előnézet
HTML · CSS · JS
<button class="we-btn-open" type="button">
<span class="we-btn-open-left"></span>
<span class="we-btn-open-right"></span>
<span class="we-btn-open-text">Tovább</span>
<span class="we-btn-open-arrow">→</span>
</button>
.we-btn-open {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 16px;
min-width: 175px;
height: 54px;
padding: 0 26px;
border: 1px solid rgba(63,159,99,.35);
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 .7s cubic-bezier(.22,1,.36,1),
border-radius .7s ease,
box-shadow .7s ease;
}
.we-btn-open-left,
.we-btn-open-right {
position: absolute;
top: 0;
width: 50%;
height: 100%;
background: #3f9f63;
transition:
transform 1s cubic-bezier(.22,1,.36,1);
}
.we-btn-open-left {
left: 0;
transform-origin: left center;
}
.we-btn-open-right {
right: 0;
transform-origin: right center;
}
.we-btn-open-text,
.we-btn-open-arrow {
position: relative;
z-index: 2;
transition:
transform .8s cubic-bezier(.22,1,.36,1),
color .6s ease;
}
.we-btn-open-arrow {
font-size: 20px;
}
.we-btn-open:hover {
transform:
translateY(-4px);
border-radius: 18px;
box-shadow:
0 20px 42px rgba(0,0,0,.42);
}
.we-btn-open:hover .we-btn-open-left {
transform:
translateX(-102%);
}
.we-btn-open:hover .we-btn-open-right {
transform:
translateX(102%);
}
.we-btn-open:hover .we-btn-open-text {
transform:
translateX(-4px);
color: #8ac99b;
}
.we-btn-open:hover .we-btn-open-arrow {
transform:
translateX(8px)
scale(1.12);
color: #5fbd7d;
}
.we-btn-open:active {
transform:
translateY(-1px)
scale(.97);
}
Ehhez az animációhoz nincs külön JavaScript.