Top Categories
CSS Tutorial in Hindi [Part 31] - CSS object-fit
- Category:
- Sub Category:
In this video i will talk about object-fit in CSS. The CSS object-fit property is used to specify how an image or video should be resized to fit its container. This property tells the content to fill the container in a variety of ways; such as "preserve that aspect ratio" or "stret
In this video i will talk about object-fit in CSS. The CSS object-fit property is used to specify how an image or video should be resized to fit its container. This property tells the content to fill the container in a variety of ways; such as "preserve that aspect ratio" or "stretch up and take up as much space as possible". Values -------------- contain: The replaced content is scaled to maintain its aspect ratio while fitting within the element’s content box. The entire object is made to fill the box, while preserving its aspect ratio, so the object will be "letterboxed" if its aspect ratio does not match the aspect ratio of the box. cover: