SHARE
TWEET

Untitled

a guest Jan 24th, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <style>
  5.             #nik {
  6.                 transition: all 2s ease;
  7.                 width: 100px;
  8.                 height: 100px;
  9.                 background: blue;
  10.             }
  11.         </style>
  12.     </head>
  13.     <body>
  14.         <div id="nik"></div>
  15.     </body>
  16.     <script>
  17.         let nik          = document.querySelector('#nik')
  18.         let change_color = () => nik.style.background = 'red'
  19.  
  20.         window.addEventListener('load', change_color)
  21.     </script>
  22. </html>
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