object-fit

Term side of the Card
Topic: Image Handling
Unit title: object-fit
Categories: Property
Explanation side of the Card

Explanation: The property that specifies how an element's content should fit within its container. It works with replaced elements like images and videos, enabling to set the content to 'contain', 'cover', 'fill', 'scale-down' or 'none', adjusting how it scales and fits.

Browser compatibility:
  • The chrome browser supports this feature starting from version 32
  • The edge browser supports this feature starting from version 79
  • The firefox browser supports this feature starting from version 36
  • The safari browser supports this feature starting from version 10
Availability: