SHARE
TWEET

Untitled

a guest Jun 26th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //imports
  2. import anime from 'animejs';
  3.  
  4. //constantes del DOM
  5. const encabezado = document.getElementById("encabezado");
  6. const contenedor_empezar = document.getElementById("contenedor_empezar");
  7. const empezar = document.getElementById("empezar");
  8.  
  9. //style
  10. function style(){
  11.     //body
  12.     document.body.style.width = "100vw";
  13.     document.body.style.height = "100vh";
  14.     document.body.style.margin = "0px";
  15.     document.body.style.background = "#34495e";
  16.     document.body.style.textAlign = "center";
  17.    
  18.     //titulo
  19.     encabezado.style.fontSize = "120px";
  20.     encabezado.style.color = "#e74c3c";
  21.     encabezado.style.margin = "0px";
  22.     encabezado.style.paddingTop = "200px";
  23.  
  24.     //contenedor_empezar
  25.     contenedor_empezar.style.margin = "100px";
  26.  
  27.     //boton_empezar
  28.     empezar.style.borderRadius = "65px";
  29.     empezar.style.backgroundColor = "transparent"; //"#8e44ad";
  30.     empezar.style.color = "aliceblue"; //"#1e3799";
  31.     empezar.style.fontSize = "60px";
  32.     empezar.style.border = "none";
  33.    
  34. }
  35.  
  36. function mouse_hover(){
  37.     empezar.style.cursor = "pointer";
  38. }
  39.  
  40. //nivel1 - estilos - esqueleto
  41. function nivel1(){
  42.     anime({
  43.         targets: '#encabezado, #contenedor_empezar',
  44.         keyframes: [
  45.             {display: none}
  46.         ],
  47.         duration: 4000,
  48.         delay: 1500,
  49.         easing: 'easeOutElastic(1, .8)'
  50.     });
  51. }
  52.  
  53. window.onload = function(){
  54.     style();
  55. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top