Created
September 5, 2012 06:19
-
-
Save anoopsankar/3631520 to your computer and use it in GitHub Desktop.
CSS Flicker
This file contains hidden or 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
#text-block .flickr { | |
color: transparent; | |
text-shadow: white 0 0 1px; | |
-webkit-transition: text-shadow 0.2s ease-in-out; | |
-moz-transition: text-shadow 0.2s ease-in-out; | |
transition: text-shadow 0.2s ease-in-out; | |
} |
This file contains hidden or 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
<div id="text-block"> | |
I am a <span class="flickr">tubelight</span> | |
</div> |
This file contains hidden or 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
$(document).ready(function() { | |
setInterval(function() { | |
var val = 1; | |
if (Math.random() > 0.5) { | |
val = Math.floor((Math.random()*10)+1); | |
} | |
$(".flickr").css("text-shadow", "white 0 0 " + val + "px"); | |
}, 200); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for that! 👍