CSS Alternating Chevron Background
Alternating chevrons in pure CSS: columns of V stripes, each shifted half a stripe from its neighbor so the colors swap. Built from diagonal gradients only.
.bg-alternating-chevrons {
--bg: #4b9c41;
--fg: #8fc188;
--size: 96px;
background-color: var(--bg);
background-image:
linear-gradient(45deg, var(--bg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(315deg, var(--bg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(225deg, var(--bg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(135deg, var(--bg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(45deg, var(--fg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(315deg, var(--fg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(225deg, var(--fg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(135deg, var(--fg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(90deg, var(--fg) 50%, transparent 0);
background-size: calc(var(--size) * 2) var(--size);
background-position:
0 0,
calc(var(--size) * -1) 0,
calc(var(--size) * -1.5) 0,
calc(var(--size) * 0.5) 0,
var(--size) 0,
0 0,
calc(var(--size) * -0.5) 0,
calc(var(--size) * 1.5) 0,
0 0;
}<div class="
[--bg:#4b9c41]
[--fg:#8fc188]
[--size:96px]
[background-color:var(--bg)]
[background-image:linear-gradient(45deg,_var(--bg)_calc(var(--size)_*_0.35355),_transparent_0),_linear-gradient(315deg,_var(--bg)_calc(var(--size)_*_0.35355),_transparent_0),_linear-gradient(225deg,_var(--bg)_calc(var(--size)_*_0.35355),_transparent_0),_linear-gradient(135deg,_var(--bg)_calc(var(--size)_*_0.35355),_transparent_0),_linear-gradient(45deg,_var(--fg)_calc(var(--size)_*_0.35355),_transparent_0),_linear-gradient(315deg,_var(--fg)_calc(var(--size)_*_0.35355),_transparent_0),_linear-gradient(225deg,_var(--fg)_calc(var(--size)_*_0.35355),_transparent_0),_linear-gradient(135deg,_var(--fg)_calc(var(--size)_*_0.35355),_transparent_0),_linear-gradient(90deg,_var(--fg)_50%,_transparent_0)]
[background-size:calc(var(--size)_*_2)_var(--size)]
[background-position:0_0,_calc(var(--size)_*_-1)_0,_calc(var(--size)_*_-1.5)_0,_calc(var(--size)_*_0.5)_0,_var(--size)_0,_0_0,_calc(var(--size)_*_-0.5)_0,_calc(var(--size)_*_1.5)_0,_0_0]
"></div><!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Alternating Chevrons — CSS background</title>
<style>
html, body { height: 100%; margin: 0; }
.bg-alternating-chevrons {
--bg: #4b9c41;
--fg: #8fc188;
--size: 96px;
background-color: var(--bg);
background-image:
linear-gradient(45deg, var(--bg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(315deg, var(--bg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(225deg, var(--bg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(135deg, var(--bg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(45deg, var(--fg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(315deg, var(--fg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(225deg, var(--fg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(135deg, var(--fg) calc(var(--size) * 0.35355), transparent 0),
linear-gradient(90deg, var(--fg) 50%, transparent 0);
background-size: calc(var(--size) * 2) var(--size);
background-position:
0 0,
calc(var(--size) * -1) 0,
calc(var(--size) * -1.5) 0,
calc(var(--size) * 0.5) 0,
var(--size) 0,
0 0,
calc(var(--size) * -0.5) 0,
calc(var(--size) * 1.5) 0,
0 0;
}
</style>
</head>
<body class="bg-alternating-chevrons"></body>
</html>Save the pattern as an image, with your current colors and settings.
Alternating Chevrons in other colors
Click a color to try it in the preview above, then copy the code.
Browse by color: Red · Orange · Yellow · Green · Teal · Blue · Purple · Pink
How the alternating chevrons pattern works
Alternating chevrons are columns of V-shaped stripes, where every other column is shifted half a stripe. Across a row the colors swap at each column edge, which gives the pattern its stacked, arrow-like rhythm.
The tile is two columns wide and one column tall. The last layer is a linear-gradient(90deg, …) that fills the left column with --fg, and the right column shows --bg. Eight small corner triangles then cut the V shapes. Each is a linear-gradient() at 45°, 135°, 225° or 315° that stops at --size × 0.35355, which is exactly a right triangle with legs half a column long. Shifting each layer with background-position puts its corner where it’s needed.
The first four triangles are --bg, cut into the left column. The other four are --fg, cut into the right column, so it gets the same V in reverse colors.
--size sets the column width, which is also the stripe height. Use it for bold hero sections, sports and kids’ brands, and retro textile designs.