]> git.ardis.lu - ard.is/commitdiff
Add flicker effect to hidden button
authorArdis Lu <ardisglu@gmail.com>
Tue, 26 Mar 2024 06:09:02 +0000 (23:09 -0700)
committerArdis Lu <ardisglu@gmail.com>
Tue, 26 Mar 2024 06:09:02 +0000 (23:09 -0700)
index.html

index 3be59ad88586db91285bfb769fe397cb84d546ef..42ebd85120c43a9a8c7613eab3fb01b8d8f2d52a 100644 (file)
       line-height: 0;
       background: none;
       transition: background-color 400ms;
+
+      &::before {
+        content: "";
+        position: absolute;
+        z-index: -1;
+        inset-inline-start: 0;
+        inset-block-start: 0;
+        inline-size: 100%;
+        block-size: 100%;
+        border-radius: 2ch;
+        animation: flicker 1s linear infinite alternate;
+      }
+    }
+
+    @keyframes flicker {
+      from {
+        background-color: hsl(216deg 90% 80% / 0.05);
+      }
+
+      to {
+        background-color: hsl(216deg 90% 80% / 0.25);
+      }
     }
 
     #ascii-container button:hover,
This page took 0.031178 seconds and 4 git commands to generate.