Utilities - Object Fit
Object Fit
Use the object fit utilities to modify how the content of a replaced element, such as an <img> or <video>, should be resized to fit its container.
Change the value of the object-fit property with our responsive object-fit utility classes. This property tells the content to fill the parent container in a variety of ways, such as preserving the aspect ratio or stretching to take up as much space as possible.
| Class |
Properties |
object-contain |
cursor: auto; |
object-cover |
cursor: default; |
object-fill |
cursor: pointer; |
object-none |
cursor: wait; |
object-scale-down |
cursor: text; |