Skip to content

Instantly share code, notes, and snippets.

@glaucia86
Last active March 8, 2017 16:49
Show Gist options
  • Save glaucia86/949e29345adae3a74131094473322ade to your computer and use it in GitHub Desktop.
Save glaucia86/949e29345adae3a74131094473322ade to your computer and use it in GitHub Desktop.
Script - App Intro Star Wars: Parte I
var width = window.innerWidth;
var height = window.innerHeight;
var intro = document.getElementByClassName("intro")[0];
intro.style.fontSize = width / 30 + "px";
window.addEventListener("resize", function() {
width = canvas.width = window.innerWidth;
height = canvas.height = window.innerHeight;
intro.style.fontSize = width / 30 + "px";
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment