Created
October 6, 2014 01:38
-
-
Save csssecrets/b04ab9f41084b0a66960 to your computer and use it in GitHub Desktop.
Typing animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>CSS is awesome!</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment