« Reply #1 on: 09 April 2025, 10:48:02 »
Нашёл, не так уж и сложно оказалось:
1. Typewriter effect
The typewriter effect simulates the nostalgic feel of text being typed out letter by letter, creating a sense of anticipation and drawing attention to the message.
<div id="typewriter"></div>
<script>
const text = "Hello, World!";
let index = 0;
function type() {
document.getElementById('typewriter').innerText += text[index];
index++;
if (index < text.length) {
setTimeout(type, 100);
}
}
type();
</script>
2. Text reveal animation
In the text reveal animation, the text is gradually revealed as if it is being revealed layer by layer, creating a sense of tension and mystery.
<div class="reveal-text">
<span class="hidden-text">Secret Message</span>
</div>
<style>
.reveal-text {
overflow: hidden;
white-space: nowrap;
}
.hidden-text {
position: relative;
left: -100%;
animation: reveal 2s forwards;
}
@keyframes reveal {
to { left: 0; }
}
</style>
Только этот код какой-то древний..


Logged
WHITE LIVES MATTER.
Всё, что нужно для счастья, — это тело, не страдающее от боли, и душа, свободная от тревог. (с) Эпикур
Останься прост, беседуя с царями,
Останься честен, говоря с толпой;
Будь прям и тверд с врагами и друзьями,
Пусть все, в свой час, считаются с тобой;
Simba mwenda pole ndiye mla nyama