Szöveganimációk
Felfelé gördülő sorok
Élő előnézet – az animáció teljes méretben.
Élő előnézet
HTML · CSS · JS
<div class="we-text-roll-card">
<h2 class="we-text-roll">
<span><strong>Fedezd fel</strong></span>
<span><strong>a világ</strong></span>
<span><strong>rejtett csodáit</strong></span>
</h2>
</div>
.we-text-roll-card {
display: inline-block;
padding: 34px 42px;
background: #f4f1e9;
border: 1px solid rgba(0, 0, 0, .08);
border-radius: 18px;
box-shadow:
0 18px 45px rgba(0, 0, 0, .22);
overflow: hidden;
}
.we-text-roll {
margin: 0;
color: #111111;
font-family: "Bodoni Moda", Georgia, serif;
font-size: clamp(34px, 5.5vw, 68px);
font-weight: 500;
line-height: 1.05;
}
.we-text-roll > span {
display: block;
height: 1.12em;
overflow: hidden;
}
.we-text-roll strong {
display: block;
font-weight: 500;
opacity: 0;
transform: translateY(110%);
animation:
weTextRoll 1.05s
cubic-bezier(.22,1,.36,1)
forwards;
}
.we-text-roll > span:nth-child(1) strong {
animation-delay: .15s;
}
.we-text-roll > span:nth-child(2) strong {
animation-delay: .35s;
}
.we-text-roll > span:nth-child(3) strong {
animation-delay: .55s;
}
@keyframes weTextRoll {
0% {
opacity: 0;
transform: translateY(110%);
}
60% {
opacity: 1;
}
100% {
opacity: 1;
transform: translateY(0);
}
}
Ehhez az animációhoz nincs külön JavaScript.