Advertisement
1xptolevitico69

Css Blink Animation

Jul 16th, 2022
1,143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.53 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.   <link rel="shortcut icon" href="https://1xpto.netlify.app/items/favicon.gif" type="image/x-icon">
  5.   <link rel="name" href="https://www.facebook.com/ManuelJSAndrade/">
  6.   <link rel="name" href="https://www.instagram.com/jolie1xpto/">
  7.   <link rel="tag" href="https://1xpto.netlify.app/articles/html/Css Blink Animation">
  8.   <meta charset="UTF-8">
  9.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11.     <title>Css Blink Animation</title>
  12.   <style>
  13.  
  14.     body {
  15.       cursor: context-menu;
  16.       margin: 0;
  17.       font-family: calibri;
  18.       overflow-x: hidden;
  19.     }
  20.  
  21.     button {
  22.       border: none;
  23.       outline: none;
  24.       background-color: red;
  25.     }
  26.  
  27.     textarea {
  28.       border: none;
  29.       background-color: white;
  30.       resize: none;
  31.       outline: none;
  32.     }
  33.  
  34.     a {
  35.       text-decoration: none;
  36.     }
  37.  
  38.     audio {
  39.       background-color: rgba(128, 128, 128, 0.1);
  40.     }
  41.  
  42.              /*  ------------  default  ---------------   */
  43.  
  44.  
  45.     .one {   border:20px solid red;width:0;border-radius:50%;
  46.              margin:100px;   }
  47.  
  48.  
  49.  
  50. </style>
  51. </head>
  52. <body>
  53.  
  54. <center><div class='one'></div></center>
  55.  
  56.  
  57.  
  58.   <script>
  59.  
  60.      delay = 500;
  61.  
  62.      one = document.getElementsByClassName("one")[0];
  63.  
  64.      setInterval(()=> {
  65.            one.style.opacity = "1";
  66.            setTimeout(()=> {  one.style.opacity = "0";   }, delay);
  67.     }, 1000);
  68.  
  69.  
  70.  
  71.  
  72.  
  73. </script>
  74. </body>
  75. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement