Typing animation pure CSS
<div class="wrapper">
  <div class="typing">This is a typing animation.</div>
</div>
body {
  margin: 0;
  background-color: #0d0d0d;
}
.wrapper {
  height: 100vh;
  display: grid;
  place-items: center;
}

.typing {
  font-family: monospace;
  font-size: 1.6em;
  color: #31e000;
  width: 27ch;
  animation: typing 2s steps(27), blink 0.5s step-end infinite alternate;
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid;
}

@keyframes typing {
  from {
    width: 0;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}
/* ESLint rules https://eslint.org/docs/2.0.0/rules/ */
/* eslint no-undef: "off" */

Typing animation pure CSS

  • Files
  • Index
  • Style
  • Script
  • README
  • CDN Add
HTML

A simple typing effect using pure CSS

PLEASE WAIT...