Skip to content

Instantly share code, notes, and snippets.

@glaucia86
Created March 8, 2017 20:02
Show Gist options
  • Save glaucia86/018e6ee3046e4f99c72adf30350d6906 to your computer and use it in GitHub Desktop.
Save glaucia86/018e6ee3046e4f99c72adf30350d6906 to your computer and use it in GitHub Desktop.
var width = window.innerWidth;
var height = window.innerHeight;
var intro = document.getElementsByClassName("intro")[0];
var historia = document.getElementsByClassName("historia")[0];
var paragrafos = document.getElementsByClassName("paragrafos")[0];
var som = document.getElementsByClassName("som")[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";
});
function iniciar() {
intro.className = 'intro intro_texto intro_animacao';
historia.className = 'historia historia_texto historia_animacao';
som.play();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment