Skip to content

Instantly share code, notes, and snippets.

@cognominal
Forked from csssecrets/dabblet.css
Created April 2, 2016 06:11
Show Gist options
  • Save cognominal/da69e14161cf54e0148824db1fe03dfe to your computer and use it in GitHub Desktop.
Save cognominal/da69e14161cf54e0148824db1fe03dfe to your computer and use it in GitHub Desktop.
Typing animation
/**
* Typing animation
*/
@keyframes typing {
from { width: 0 }
}
@keyframes caret {
50% { border-right-color: transparent; }
}
h1 {
font: bold 200% Consolas, Monaco, monospace;
/*width: 8.25em;*/
width: 15ch;
white-space: nowrap;
overflow: hidden;
border-right: .05em solid;
animation: typing 8s steps(15),
caret 1s steps(1) infinite;
}
<h1>CSS is awesome!< Voil`a/h1>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment