CSS Typing Effect

HTML
<div class="type"> <div class="type--effect"> Lorem ipsum dolor sit amet... </div> </div>
SCSS
.type { height: 80vh; display: flex; align-items: center; justify-content: center; &--effect { width: 30ch; animation: typing 2s steps(30), effect .5s step-end infinite alternate; white-space: nowrap; overflow: hidden; border-right: 3px solid; font-family: monospace; font-size: 2em; } } @keyframes typing { from { width: 0 } } @keyframes effect { 50% { border-color: transparent } }
JAVASCRIPT
Expand for more options Login