Gombanimációk
Szétváló felület
Élő előnézet – az animáció teljes méretben.
Élő előnézet
HTML · CSS · JS
<button class="we-btn-split">
<span class="we-btn-split-left"></span>
<span class="we-btn-split-right"></span>
<span class="we-btn-split-text">
Tovább
</span>
<span class="we-btn-split-arrow">
→
</span>
</button>
.we-btn-split {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 16px;
min-width: 170px;
height: 54px;
padding: 0 26px;
border: 1px solid rgba(255,255,255,.14);
border-radius: 14px;
background: transparent;
color: #f2f4f0;
font-family: Arial, sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
overflow: hidden;
transition:
transform .4s cubic-bezier(.22,1,.36,1),
border-radius .5s ease,
box-shadow .5s ease;
}
.we-btn-split-left,
.we-btn-split-right {
position: absolute;
top: 0;
width: 51%;
height: 100%;
background: #151e22;
transition:
transform .65s cubic-bezier(.22,1,.36,1);
}
.we-btn-split-left {
left: 0;
}
.we-btn-split-right {
right: 0;
}
.we-btn-split-text,
.we-btn-split-arrow {
position: relative;
z-index: 3;
transition:
transform .55s cubic-bezier(.22,1,.36,1),
color .35s ease;
}
.we-btn-split-arrow {
font-size: 19px;
}
.we-btn-split:hover {
transform:
translateY(-3px);
border-radius: 18px;
box-shadow:
0 18px 38px rgba(0,0,0,.4);
}
.we-btn-split:hover .we-btn-split-left {
transform:
translateX(-88%);
}
.we-btn-split:hover .we-btn-split-right {
transform:
translateX(88%);
}
.we-btn-split:hover .we-btn-split-text {
transform:
translateX(-4px);
}
.we-btn-split:hover .we-btn-split-arrow {
transform:
translateX(7px)
scale(1.1);
}
.we-btn-split:active {
transform:
translateY(0)
scale(.97);
}
Ehhez az animációhoz nincs külön JavaScript.