Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- #nik {
- transition: all 2s ease;
- width: 100px;
- height: 100px;
- background: blue;
- }
- </style>
- </head>
- <body>
- <div id="nik"></div>
- </body>
- <script>
- let nik = document.querySelector('#nik')
- let change_color = () => nik.style.background = 'red'
- window.addEventListener('load', change_color)
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement