Skip to content

Instantly share code, notes, and snippets.

@ctgnauh
Created May 18, 2023 04:23
Show Gist options
  • Save ctgnauh/8b7580cd6769600aadeb20a48029d8ee to your computer and use it in GitHub Desktop.
Save ctgnauh/8b7580cd6769600aadeb20a48029d8ee to your computer and use it in GitHub Desktop.
Using CSS to Simulate Scan Lines
/* source: https://rekt.network/ */
/* filter */
.scanlines {
z-index: 900;
background: linear-gradient(rgba(18,16,16,0) 50%,rgba(0,0,0,0.25) 50%),linear-gradient(90deg,rgba(255,0,0,0.06),rgba(0,255,0,0.03),rgba(0,0,255,0.06));
background-size: 100% 2px,3px 100%
}
/* animation */
.scanline {
z-index: 1010;
animation: scanline 7.77s linear infinite
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment