Skip to content

Instantly share code, notes, and snippets.

@josephrexme
Forked from dfrankland/checkered.css
Created December 4, 2021 21:52
Show Gist options
  • Save josephrexme/98762e096ee1b94000480109662a6606 to your computer and use it in GitHub Desktop.
Save josephrexme/98762e096ee1b94000480109662a6606 to your computer and use it in GitHub Desktop.
CSS Checkered pattern that can be used on all modern browsers.
body {
background-image:
linear-gradient(45deg, #ccc 25%, transparent 25%),
linear-gradient(135deg, #ccc 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #ccc 75%),
linear-gradient(135deg, transparent 75%, #ccc 75%);
background-size:25px 25px; /* Must be a square */
background-position:0 0, 12.5px 0, 12.5px -12.5px, 0px 12.5px; /* Must be half of one side of the square */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment