Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <!-- Global site tag (gtag.js) - Google Analytics -->
- <script async="" src="https://www.googletagmanager.com/gtag/js?id=G-420XFJRS1M"></script>
- <script>
- window.dataLayer = window.dataLayer || [];
- function gtag() {
- dataLayer.push(arguments);
- }
- gtag('js', new Date());
- gtag('config', 'G-420XFJRS1M');
- </script>
- <link rel="shortcut icon" href="https://1xpto.netlify.app/image/favicon.gif" type="image/x-icon">
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>JavaScript blink essay</title>
- <style>
- body {
- margin: 0;
- }
- * {
- box-sizing: border-box;
- }
- #btn {
- outline: 5px solid navy;
- border: 3px solid white;
- border-radius: 50%;
- margin: 50px;
- width: 200px;
- height: 200px;
- background-color: red;
- color: white;
- font-family: arial black;
- font-size: 30px;
- }
- @media (orientation: portrait) {
- #btn {
- margin: 50px auto;
- }
- }
- </style>
- </head>
- <body>
- <center><button id='btn'>ALERT</button< /center>
- <script>
- delay = 1500;
- setInterval(() => {
- btn.style.opacity = 1;
- setTimeout(() => {
- btn.style.opacity = 0;
- }, delay);
- }, 2000);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement