Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.63 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport"
  6.          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7.     <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8.     <title>BOOM</title>
  9.     <style>
  10.  
  11.         @keyframes smecherie {
  12.             0%   { transform: rotateY(0deg); }
  13.             100% { transform: rotateY(30deg); }
  14.         }
  15.  
  16.         h1 {
  17.             font-size: var(--titlu-size);
  18.             animation: smecherie 2s infinite;
  19.         }
  20.  
  21.         .cul {
  22.             color: var(--culoare);
  23.             animation: smecherie 2s infinite;
  24.         }
  25.  
  26.         .cul2 {
  27.             color: var(--culoare2);
  28.             animation: smecherie 2s infinite;
  29.         }
  30.  
  31.         .cul3 {
  32.             color: var(--culoare3);
  33.             animation: smecherie 2s infinite;
  34.         }
  35.     </style>
  36.     <script type="text/javascript">
  37.         document.addEventListener('DOMContentLoaded', function () {
  38.             var size = 10;
  39.             var direction = 'up';
  40.             var root = document.documentElement;
  41.             var i = 0;
  42.             var numar = document.getElementById("numar");
  43.             var cod = document.getElementById("cod");
  44.             var txt = 'a';
  45.             setInterval(function () {
  46.                 root.style.setProperty('--titlu-size', size + "px");
  47.  
  48.                 if (i%2 === 0) {
  49.                     root.style.setProperty('--culoare', "red");
  50.                     root.style.setProperty('--culoare2', "blue");
  51.                     root.style.setProperty('--culoare3', "red");
  52.                 } else {
  53.                     root.style.setProperty('--culoare', "green");
  54.                     root.style.setProperty('--culoare2', "black");
  55.                     root.style.setProperty('--culoare3', "pink");
  56.                 }
  57.  
  58.                 if (direction === 'up') {
  59.                     size = size + 1;
  60.                 } else {
  61.                     size = size - 1;
  62.                 }
  63.  
  64.                 if(size > 120) {
  65.                     direction = 'down';
  66.                 }
  67.  
  68.                 if (size === 9) {
  69.                     direction = 'up';
  70.                 }
  71.  
  72.                 i = i+1;
  73.  
  74.                 numar.innerHTML = (i * i * i * i * i * i) + 3 * i * i;
  75.                 cod.innerHTML = txt + "<br/>" + window.btoa(i * i * i * i);
  76.  
  77.                 txt = txt += "a";
  78.  
  79.             }, 0.1);
  80.         });
  81.  
  82.     </script>
  83. </head>
  84. <body>
  85. <h1>Ai fost <span class="cul">hackuit</span>.<br/><br/><div id="numar" class="cul2"></div><div id="cod" class="cul3"></div></h1>
  86. </body>
  87. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement