All effectsVisual styles

Diagonal Stripe Pattern

斜线条纹

Repeat diagonal bands at a fixed angle and distance to give a surface direction.

Observe the parallel bands and the space between them

Where to use it

Distinguish placeholders, secondary sections or infographic fills. Use the repeated bands to mark a clearly bounded area with a different status, and give that status a text label.

Practical example

A warehouse planning board fills a row of closed bays with muted diagonal stripes. A “Maintenance” label explains the reason, and adjacent bays with solid backgrounds are easy to pick for an incoming delivery.

AI prompt

Add a Diagonal Stripe Pattern to [target area] using a repeating linear gradient. Set separate width variables for the stripe and gap and use a subtle contrast. Test that the spacing avoids moiré effects and remains legible around foreground content.

Example code

Save the standalone HTML as a file and open it in your browser. It uses the same code as the preview.

View HTML
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Diagonal Stripe Pattern</title>
  <style>
    :root {
      color-scheme: dark;
      --demo-bg: #171629;
      --demo-ink: #f8f5ff;
      --demo-accent: #b9a6ff;
      --demo-muted: #bfbbd3;
      font-family: system-ui, sans-serif;
      color: var(--demo-ink);
      background: var(--demo-bg);
    }

    *, *::before, *::after { box-sizing: border-box; }
    body { margin: 0; min-width: 0; }
    button, input { font: inherit; }

    .demo {
      display: grid;
      place-items: center;
      align-content: center;
      min-height: 100vh;
      padding: 14px;
      overflow: hidden;
      background: radial-gradient(ellipse at 50% 24%, #28233f, var(--demo-bg) 78%);
    }

    .demo-button {
      border: 1px solid #ffffff3d;
      border-radius: 7px;
      background: #ffffff12;
      color: var(--demo-ink);
      padding: 6px 11px;
      font-size: 12px;
      cursor: pointer;
    }

    :focus-visible {
      outline: 2px solid var(--demo-accent);
      outline-offset: 3px;
    }

    .visual-specimen {
      width: min(100%, 290px);
      height: 124px;
      display: grid;
      place-items: center;
      position: relative;
      isolation: isolate;
    }
    .stripes {
      width: min(100%, 212px); height: 100px; display: grid; place-items: center; border-radius: 9px;
      background: repeating-linear-gradient(130deg, #233d52 0 5px, #367080 5px 8px);
      border: 1px solid #78b3b3;
    }
    .stripes i { width: 64px; height: 35px; border-radius: 7px; background: #b5e4d6; box-shadow: 5px 5px #182e40; }
  </style>
</head>
<body>
  <main class="demo">
    <div class="visual-specimen" aria-hidden="true"><div class="stripes"><i></i></div></div>
  </main>
</body>
</html>

Original example by UI Skills