Gombanimációk
Körből nyíló gomb
Élő előnézet – az animáció teljes méretben.
Élő előnézet
HTML · CSS · JS
<button class="we-btn-bar" type="button">
<span class="we-btn-bar-text">Megnézem</span>
<span class="we-btn-bar-arrow">→</span>
<span class="we-btn-bar-line"></span>
</button>
.we-btn-bar {
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(255,255,255,.16);
border-radius: 12px;
background: #111518;
color: #f3f0e8;
font-family: Arial, sans-serif;
font-size: 14px;
font-weight: 500;
letter-spacing: .4px;
cursor: pointer;
overflow: hidden;
transition:
transform .75s cubic-bezier(.22,1,.36,1),
border-radius .75s cubic-bezier(.22,1,.36,1),
border-color .6s ease,
box-shadow .75s ease;
}
.we-btn-bar-text,
.we-btn-bar-arrow {
position: relative;
z-index: 2;
transition:
transform .8s cubic-bezier(.22,1,.36,1),
color .6s ease;
}
.we-btn-bar-arrow {
font-size: 20px;
line-height: 1;
}
.we-btn-bar-line {
position: absolute;
left: 50%;
bottom: 0;
width: 18px;
height: 3px;
border-radius: 3px 3px 0 0;
background: #c9a86a;
transform:
translateX(-50%)
scaleX(1);
transform-origin: center;
transition:
width 1s cubic-bezier(.22,1,.36,1),
height .7s cubic-bezier(.22,1,.36,1),
border-radius .7s ease;
}
.we-btn-bar:hover {
transform:
translateY(-4px);
border-radius: 18px;
border-color: rgba(201,168,106,.55);
box-shadow:
0 20px 42px rgba(0,0,0,.42);
}
.we-btn-bar:hover .we-btn-bar-line {
width: 100%;
height: 100%;
border-radius: 0;
}
.we-btn-bar:hover .we-btn-bar-text {
color: #17130d;
transform:
translateY(-1px)
translateX(-3px);
}
.we-btn-bar:hover .we-btn-bar-arrow {
color: #17130d;
transform:
translateX(7px)
scale(1.12);
}
.we-btn-bar:active {
transform:
translateY(-1px)
scale(.97);
}
Ehhez az animációhoz nincs külön JavaScript.