CSS background-size Property Reference

The CSS background-size property is a standard property in CSS Backgrounds and Borders. Review its formal syntax, computed behavior, and practical declarations.

CSS background-size Property Reference

The CSS background-size property is a standard property in CSS Backgrounds and Borders. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

background-size overview

The CSS background-size property is a standard property in CSS Backgrounds and Borders. Review its formal syntax, computed behavior, and practical declarations.

The property is not inherited by default. Use an explicit global keyword when inheritance is intended.

Syntax and formal definition

background-size formal syntax
FieldValue
Formal syntax<bg-size>#
Initial valueauto auto
Applies toallElements
InheritedNo
PercentagesrelativeToBackgroundPositioningArea
Computed valueasSpecifiedRelativeToAbsoluteLengths
Animation typerepeatableList
Mediavisual
Specification groupCSS Backgrounds and Borders
StatusStandard

Practical examples

These declarations demonstrate valid ways to set background-size. The initial and inherit global keywords remain available even when a property-specific value is preferable.

background-size live example
CSS .reset-example { background-size: initial; } .inherit-example { background-size: inherit; } @supports (background-size: initial) { .supported { background-size: initial; } }

Description

The CSS background-size property is a standard property in CSS Backgrounds and Borders. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: background-size
  2. MDN: CSS Properties Reference

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies