CSS object-fit Property Reference

The CSS object-fit property is a standard property in CSS Images. Review its formal syntax, computed behavior, and practical declarations.

CSS object-fit Property Reference

The CSS object-fit property is a standard property in CSS Images. Review its formal syntax, computed behavior, and practical declarations.

Updated 2026-08-12

object-fit overview

The CSS object-fit property is a standard property in CSS Images. 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

object-fit formal syntax
FieldValue
Formal syntaxfill | contain | cover | none | scale-down
Initial valuefill
Applies toreplacedElements
InheritedNo
Percentagesno
Computed valueasSpecified
Animation typediscrete
Mediavisual
Specification groupCSS Images
StatusStandard

Practical examples

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

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

Description

The CSS object-fit property is a standard property in CSS Images. Review its formal syntax, computed behavior, and practical declarations.

References

  1. MDN: object-fit
  2. MDN: CSS Properties Reference

Similar or alternative tools

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