A simple typing text animation for hero sections or intros.
This snippet allows you to add a smooth typing effect to your website hero or intro sections. Perfect for web developers looking to enhance user engagement with dynamic text animations. The code is lightweight, customizable, and easy to integrate with existing HTML and CSS.
<h1> tag.animation-duration in @keyframes typing.<h1 class="typing">Welcome to ASWCode!</h1>
<style>
.typing {
color: #ffffff;
border-right: 3px solid #00ffcc;
white-space: nowrap;
overflow: hidden;
width: 0;
animation: typing 3s steps(20) forwards, blink 0.6s infinite;
}
@keyframes typing {
to { width: 20ch; }
}
@keyframes blink {
50% { border-color: transparent; }
}
</style>