Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Document</title>
- <style>
- .null{
- transition:1s;
- opacity: 0;
- width: 30px;
- height: 30px;
- background: white;
- display: inline-block;
- margin: 10px;
- }
- .box{
- width: 30px;
- height: 30px;
- background: green;
- display: inline-block;
- margin: 10px;
- opacity: 1;
- }
- </style>
- </head>
- <body>
- <script>
- let el = document.createElement('div')
- document.body.appendChild(el)
- el.classList.add('null')
- setTimeout(function(){el.classList.add('box')}, 10)
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement