Skip to content

Instantly share code, notes, and snippets.

@oguzhanaslan
Created June 11, 2014 18:07
Show Gist options
  • Save oguzhanaslan/10f8049e7dcf432aad7b to your computer and use it in GitHub Desktop.
Save oguzhanaslan/10f8049e7dcf432aad7b to your computer and use it in GitHub Desktop.
logoeffect.js
var radius = 0;
var interval = window.setInterval(function() {
$(".logo a").css({
"-webkit-mask": "-webkit-gradient(radial, 17 17, " + radius + ", 17 17, " + (radius + 15) + ", from(rgb(0, 0, 0)), color-stop(0.5, rgba(0, 0, 0, .2)), to(rgb(0, 0, 0)))",
"-o-mask": "-webkit-gradient(radial, 17 17, " + radius + ", 17 17, " + (radius + 15) + ", from(rgb(0, 0, 0)), color-stop(0.5, rgba(0, 0, 0, .2)), to(rgb(0, 0, 0)))",
"-moz-mask": "-webkit-gradient(radial, 17 17, " + radius + ", 17 17, " + (radius + 15) + ", from(rgb(0, 0, 0)), color-stop(0.5, rgba(0, 0, 0, .2)), to(rgb(0, 0, 0)))",
"mask": "-webkit-gradient(radial, 17 17, " + radius + ", 17 17, " + (radius + 15) + ", from(rgb(0, 0, 0)), color-stop(0.5, rgba(0, 0, 0, .2)), to(rgb(0, 0, 0)))"
});
radius++;
if (radius === 200) {
window.clearInterval(interval);
}
}, "fast");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment