object-fit
object-fit
The object-fit
CSS property specifies how the contents of a replaced element should be fitted to the box established by its used height and width.
/* Keyword values */ object-fit: fill; object-fit: contain; object-fit: cover; object-fit: none; object-fit: scale-down; /* Global values */ object-fit: inherit; object-fit: initial; object-fit: unset;
Initial value | fill |
---|---|
Applies to | replaced elements |
Inherited | no |
Media | visual |
Computed value | as specified |
Animation type | discrete |