Advertisement
1xptolevitico69

JavaScript blink essay

Oct 6th, 2024
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.47 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.  
  4. <head>
  5.   <!-- Global site tag (gtag.js) - Google Analytics -->
  6.   <script async="" src="https://www.googletagmanager.com/gtag/js?id=G-420XFJRS1M"></script>
  7.   <script>
  8.     window.dataLayer = window.dataLayer || [];
  9.  
  10.     function gtag() {
  11.       dataLayer.push(arguments);
  12.     }
  13.     gtag('js', new Date());
  14.     gtag('config', 'G-420XFJRS1M');
  15.   </script>
  16.   <link rel="shortcut icon" href="https://1xpto.netlify.app/image/favicon.gif" type="image/x-icon">
  17.   <meta charset="UTF-8">
  18.   <meta http-equiv="X-UA-Compatible" content="IE=edge">
  19.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  20.   <title>JavaScript blink essay</title>
  21.   <style>
  22.     body {
  23.       margin: 0;
  24.     }
  25.  
  26.     * {
  27.       box-sizing: border-box;
  28.     }
  29.  
  30.     #btn {
  31.       outline: 5px solid navy;
  32.       border: 3px solid white;
  33.       border-radius: 50%;
  34.       margin: 50px;
  35.       width: 200px;
  36.       height: 200px;
  37.       background-color: red;
  38.       color: white;
  39.       font-family: arial black;
  40.       font-size: 30px;
  41.     }
  42.  
  43.     @media (orientation: portrait) {
  44.       #btn {
  45.         margin: 50px auto;
  46.       }
  47.     }
  48.   </style>
  49. </head>
  50.  
  51. <body>
  52.  
  53.   <center><button id='btn'>ALERT</button< /center>
  54.  
  55.       <script>
  56.         delay = 1500;
  57.         setInterval(() => {
  58.           btn.style.opacity = 1;
  59.           setTimeout(() => {
  60.             btn.style.opacity = 0;
  61.           }, delay);
  62.         }, 2000);
  63.       </script>
  64. </body>
  65.  
  66. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement