Skip to content

Instantly share code, notes, and snippets.

@arnorhs
Created May 19, 2017 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arnorhs/9340774df5c21c75002e0cb5402eb99b to your computer and use it in GitHub Desktop.
Save arnorhs/9340774df5c21c75002e0cb5402eb99b to your computer and use it in GitHub Desktop.
var els = document.querySelectorAll('h1, h2, h3, h4, h5, h6, a, p, div');
function transform() {
Array.prototype.forEach.call(els, function(p) {
p.style.transform = 'translateY(' + (Math.random() - 0.5) + 'px)';
});
requestAnimationFrame(function() {
transform();
});
}
transform();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment