Last active
April 18, 2016 01:53
-
-
Save dr-dimitru/7164555 to your computer and use it in GitHub Desktop.
Blinking cursor | Safari, FF, Opera, Chrome - 100% support | Example here: http://ostr.io
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
<html> | |
<head> | |
<style> | |
span.cursor { | |
-webkit-animation: blink 2s steps(1) infinite; | |
-moz-animation: blink 2s steps(1) infinite; | |
-ms-animation: blink 2s steps(1) infinite; | |
-o-animation: blink 2s steps(1) infinite; | |
animation: blink 2s steps(1) infinite; | |
} | |
@-webkit-keyframes blink { | |
from, 49% { background: #222; color: #fff; } | |
51%, to { background: #fff; color: #222; } | |
} | |
@-moz-keyframes blink { | |
from, 49% { background: #222; color: #fff; } | |
51%, to { background: #fff; color: #222; } | |
} | |
@-ms-keyframes blink { | |
from, 49% { background: #222; color: #fff; } | |
51%, to { background: #fff; color: #222; } | |
} | |
@-o-keyframes blink { | |
from, 49% { background: #222; color: #fff; } | |
51%, to { background: #fff; color: #222; } | |
} | |
@keyframes blink { | |
from, 49% { background: #bd362f; color: #fff; } | |
51%, to { background: #fff; color: #222; } | |
} | |
</style> | |
<title>Blinking cursor example</title> | |
</head> | |
<body> | |
<p>Text where last character is blinkin<span class="cursor">g</span></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment