object-fit
Widely available
The object-fit
CSS property sets how images, videos, and other replaced elements are scaled within their container.
To learn more, see
object-fit at MDN.
Compatibility (view on caniuse.com)
- Chrome 32 Released on 2014-01-14
- Chrome Android 32 Released on 2014-01-15
- Edge 79 Released on 2020-01-15
- Firefox 36 Released on 2015-02-24
- Firefox for Android 36 Released on 2015-02-27
- Safari 10 Released on 2016-09-20
- Safari on iOS 10 Released on 2016-09-13