Skip to content
Musterli

Grid

Grid Lines CSS pattern

Thin lines on a square grid, rotatable to any angle.

Customize in the editor

Change colors, size and opacity, then export as CSS, SVG or PNG.

Code

Paste the lines into your element's rule. The pattern repeats by itself and adapts to any size.

CSS

background-color: #f1f5f9;
background-image: repeating-linear-gradient(0deg, #334155 0px 2px, transparent 2px 32px), repeating-linear-gradient(90deg, #334155 0px 2px, transparent 2px 32px);
background-size: 100% 100%, 100% 100%;
background-position: 0 0, 0 0;

Tailwind

bg-[#f1f5f9] [background-image:repeating-linear-gradient(0deg,_#334155_0px_2px,_transparent_2px_32px),_repeating-linear-gradient(90deg,_#334155_0px_2px,_transparent_2px_32px)] [background-size:100%_100%,_100%_100%] [background-position:0_0,_0_0]

How to use this pattern

Copy the CSS into the rule of the element that should carry the pattern, for example a section, a card or the body. The colors are hex values in the code and can be swapped directly. In the editor you change everything with sliders and can also export the pattern as SVG or PNG.

All CSS patterns
  • Graph Paper

    A fine minor grid with a bold major line every five cells.

    Grid

  • Dotted Grid

    Grid lines with a dot on every crossing.

    Grid

  • Crosshatch

    Diagonal lines in both directions, like a lattice or hatching.

    Grid

  • Bricks

    A running bond brick wall drawn as mortar lines.

    Grid

  • Tiles

    Square tiles in two colors with narrow grout lines.

    Grid

  • Stripes

    Wide stripes at any angle you like.

    Stripes