Backgrounds✨ Premium

Network Lines

Pure CSS background: two sets of crossed diagonal tiles at 60 px and a 3 px radial node weave an indigo geometric network mesh on a dark base — zero JS, zero CPU cost.

CSSPatternTech

You'll get access to the interactive demo with a free account.

This effect is part of Effect.Labs — 811 vanilla effects, some free, some premium. Backgrounds has 50 effects, including 6 free. Explore the category →

3 usage examples

Full-screen section — Cloud platform or network infrastructure — Network Lines example 1

① Full-screen section — Cloud platform or network infrastructure

WhenA hero section or feature page for a connectivity, CDN, VPN, or DevOps platform product needs to convey a 'tech / network' universe without visually overloading the main content.
WhyRepeated geometric diagonals directly evoke a connection mesh. The pattern covers the full surface without distracting from text thanks to its low opacity (0.6) — content stays clearly readable on top.
SettingsColor `rgba(139, 92, 246, 0.6)` to shift to a trendier purple; tile `80px 80px` to open up the network; base `#07070d`.
Navigation sidebar — DevOps or monitoring tool — Network Lines example 2

② Navigation sidebar — DevOps or monitoring tool

WhenA full-height navigation panel in an infrastructure or monitoring tool needs to signal a 'network' universe even when the item list is empty — the background alone anchors the column's visual identity.
WhyThe sidebar surface (100 vh) is large enough for the diagonal mesh to read fully; the reduced opacity keeps icons and labels perfectly readable in the foreground without competing with the navigation hierarchy.
SettingsColor `rgba(99, 102, 241, 0.35)` for a subtle pattern behind navigation items; tile `50px 50px`; base `#0d1117` to match common dark themes in dev tools.
Loading screen — Strategy game or network simulation — Network Lines example 3

③ Loading screen — Strategy game or network simulation

WhenWhile connecting to a lobby or loading a match, the transition screen must immediately anchor the 'connection / nodes' universe of the game — pure CSS avoids any additional bundle cost.
WhyThe network line pattern covers the full surface and reinforces the simulation theme without a single line of JS. The 60 px tile and radial node create a strategic grid feel perfectly suited to the player's active wait.
SettingsColor `rgba(99, 102, 241, 0.55)` for a more visible network during loading; node radius `5px` to make it stand out at full size; base `#050508` very dark for immersion.

How it works

The effect relies entirely on the background property of a single <div>: no JavaScript, no canvas, no animation loop. The pattern is rendered directly by the browser's CSS engine via three stacked gradient layers in the background shorthand.

The first layer is a 135° linear gradient with near-transparent color bands: from 0% to 73% the tint is invisible, from 73% to 75% it rises to rgba(99, 102, 241, 0.6), from 75% to 77% it drops back to zero. This 2% gap produces a ~1.2 px hairline on the tile. The position 0 0 and size 60px 60px enable tiling (background-repeat: repeat by default): the browser repeats the tile across the full surface, creating a grid of parallel lines spaced 60 px apart running diagonally from top-left to bottom-right.

The second layer applies the same scheme at 45° (opposite direction) without an explicit background-size: the gradient stretches across the full box and draws one accent diagonal that crosses the grid, evoking a bidirectional connection mesh. The third layer is a radial-gradient(3px, …): a circle of radius 3 px in indigo at 80% opacity, centered by default, materialising a network intersection node. The final background-color #0a0a0f provides the dark base on which the semi-transparent lines composite.

Because the entire visual is carried by CSS, rendering is instant (no first JS tick, no deferred repaint), idle CPU cost is zero, and the effect applies to any element with a single CSS class without modifying its flow or positioning.

Accessibility

  • No prefers-reduced-motion handling needed: the effect is fully static — no animation, no requestAnimationFrame. Users who enable reduced motion are not affected.
  • The <div class="bg-network"> is decorative: add aria-hidden="true" if the element carries no text content meaningful to screen readers.
  • Overlay text (headings, labels) must be in visible HTML rather than in CSS — white text on #0a0a0f exceeds WCAG AA contrast (ratio > 7:1).
  • The indigo lines on a very dark background are purely decorative (WCAG 1.4.11 exempts decorative non-text elements from non-text contrast requirements).
  • No keyboard or pointer interaction is defined on the effect: no focus to manage, no added tab stops.

Browser compatibility

Three standard CSS properties — `linear-gradient`, `radial-gradient`, `background-size` — available in every browser for over a decade.

Chrome 26+✓ Full
Firefox 16+✓ Full
Safari 7+✓ Full
Edge 12+✓ Full
Mobile iOS✓ Full
Android Chrome✓ Full

If the browser ignores <code>linear-gradient</code> (IE 9 without vendor prefix), the entire <code>background</code> property is skipped and the <code>&lt;div&gt;</code> renders in solid <code>#0a0a0f</code> — no JS error, the page stays functional.

The code

HTML structure to paste into your page (CSS + JS available with a premium account):

index.html — structure
<div class="bg-network" style="position:relative;width:100%;min-height:300px;" aria-hidden="true">
  <!-- Optional overlay (text, buttons) -->
  <span class="bg-label">Your title</span>
</div>
🔒 Unlock the full code — from €2.99 the first month

Full HTML + CSS + JS, copy-paste ready — with hundreds of premium effects.

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
rgba(99, 102, 241, .6) — in both linear-gradient layers indigo, 60% opacity Line color and opacity. Replace with your brand tint in both occurrences; lower opacity to 0.3 for a very subtle pattern or raise to 0.9 for prominent lines.
73% and 77% — linear-gradient stops 2% gap (≈ 1.2 px on 60 px) Line thickness: narrow the gap to 1% to thin lines (~0.6 px), widen to 4% to thicken (~2.4 px). Update both gradient layers together.
60px 60px — background-size of the first layer 60 × 60 px Grid spacing: 90 px for an airier network, 30 px for a dense mesh. Only the first layer (135°) is explicitly tiled.
rgba(99, 102, 241, .8) — in the radial-gradient indigo, 80% opacity Node color and opacity. Match the line tint or use an accent color to highlight the intersection point.
3px — in radial-gradient(3px, …) 3 px radius Node radius: 5–8 px for a clearly visible dot, or remove the radial layer entirely to eliminate the node.
#0a0a0f — final background-color #0a0a0f (near-black) Base background: the only place to change the background tint without touching the gradients. `#030712` (very dark navy) or `#0f1117` (dark slate) give close tech feels.

FAQ

Yes. Add @keyframes nw-scroll { to { background-position: 60px 60px, 100% 100%, center; } } and apply animation: nw-scroll 6s linear infinite to .bg-network. The first (tiled) layer scrolls visibly; the other two track their end positions. Add @media (prefers-reduced-motion: reduce) { .bg-network { animation: none; } } as soon as the animation is enabled.
By default only the first layer is tiled (60 × 60 px). To tile the 45° diagonal as well, add explicit sizing: background-size: 60px 60px, 60px 60px, auto;. Both sets of parallels then cross at regular intervals, producing a proper diagonal grid rather than a grid plus one accent diagonal.
A faint moiré can appear on HiDPI displays (DPR 2 or 3) when ~1.2 px lines land on sub-pixel boundaries. Slightly widening the stops (72%–78%, giving ~3.6 px on 60 px) eliminates the artefact. Alternatively, lowering opacity to 0.4 makes any residual moiré imperceptible.