allienworks
9/5/2012 - 6:19 AM

CSS Flicker

CSS Flicker

$(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);
});
<div id="text-block">
     I am a <span class="flickr">tubelight</span>
</div>
#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;
}