Background Repeat

Set the repeat behavior for background images.

Widely available

This feature is well established and works across many devices and browser versions.

Chrome
Edge
Firefox
Safari

Usage

Repeat

The background image repeats horizontally & vertically.

<div class="h-s br-r bp-c" style="background-image: url('...');">
<div class="p-10"></div>
</div>

The background image does not repeat.

<div class="h-s br-nr bp-c" style="background-image: url('...');">
<div class="p-10"></div>
</div>

The background image repeats & resizes to fit the area.

<div class="h-s br-ro bp-c" style="background-image: url('...');">
<div class="p-10"></div>
</div>

The background image repeats horizontally only.

<div class="h-s br-rx bp-c" style="background-image: url('...');">
<div class="p-10"></div>
</div>

The background image repeats vertically only.

<div class="h-s br-ry bp-c" style="background-image: url('...');">
<div class="p-10"></div>
</div>

The background image repeats & spaces evenly.

<div class="h-s br-s bp-c" style="background-image: url('...');">
<div class="p-10"></div>
</div>

Responsiveness

Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.

Target viewport sizes with breakpoint prefixes.

sm:br-*
Small640px
md:br-*
Medium768px
lg:br-*
Large1024px
xxl:br-*
Extra Large1536px

Hover State

Apply styles conditionally on hover using the h: prefix.

Add the h: prefix to apply styles only when the user hovers over the element.

Syntax:h:br-*