Created
March 8, 2017 19:02
-
-
Save glaucia86/68856a75daa1a0bbe57e66d0c0649f9e to your computer and use it in GitHub Desktop.
Script - App Intro Star Wars: Parte 4
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
var width = window.innerWidth; | |
var height = window.innerHeight; | |
var intro = document.getElementByClassName("intro")[0]; | |
var historia = document.getElementByClassName("historia")[0]; | |
var paragrafos = document.getElementByClassName("paragrafos")[0]; | |
intro.style.fontSize = width / 30 + "px"; | |
paragrafos.style.height = height + "px"; | |
window.addEventListener("resize", function() { | |
width = canvas.width = window.innerWidth; | |
height = canvas.height = window.innerHeight; | |
intro.style.fontSize = width / 30 + "px"; | |
historia.style.fontSize = width / 20 + "px"; | |
paragrafos.style.height = height + "px"; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment