css.properties

object-fit

The object-fit property specifies how content is resized to fit its container.

Formal Syntax

object-fit = fill | none | [contain | cover] || scale-down

See specification

JavaScript Access

// Access via element.style element.style.objectFit = "fill";

Browser Support

standard | MDN ยท Spec

FeatureChromeFirefoxSafariEdge
object-fit32361079
contain32361079
cover32361079
fill32361079
none32361079
scale-down32361079

Related Properties