Skip to content

Instantly share code, notes, and snippets.

@erickarbe
Created January 5, 2013 14:30
Show Gist options
  • Save erickarbe/4461806 to your computer and use it in GitHub Desktop.
Save erickarbe/4461806 to your computer and use it in GitHub Desktop.
A pure CSS blinking cursor.
span.cursor {
display: inline-block;
margin-left: 1px;
-webkit-animation: blink 2s linear 0s infinite;
-moz-animation: blink 2s linear 0s infinite;
-ms-animation: blink 2s linear 0s infinite;
-o-animation: blink 2s linear 0s infinite;
}
@-webkit-keyframes blink {
0% { color: #FFF }
47% { color: #FFF }
50% { color: #000 }
97% { color: #000 }
100% { color: #FFF }
}
@-moz-keyframes blink {
0% { color: #FFF }
47% { color: #FFF }
50% { color: #000 }
97% { color: #000 }
100% { color: #FFF }
}
@-ms-keyframes blink {
0% { color: #FFF }
47% { color: #FFF }
50% { color: #000 }
97% { color: #000 }
100% { color: #FFF }
}
@-o-keyframes blink {
0% { color: #FFF }
47% { color: #FFF }
50% { color: #000 }
97% { color: #000 }
100% { color: #FFF }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment