filmov
tv
What is Object-fit & How to use it? (CSS Tips)

Показать описание
Today we are looking at a rather new CSS property: object-fit. This property decides how an element, such as an image or a video, should be resized to fit its container. It's like the background-size property for setting an image background. You can set the background-size to be cover, which might cut part of the image as it tries to maintain the aspect ratio while resizing; or contain, which will fit the whole image in the container. Object-fit offers similar powers, but your image is a regular element in a container, not the background. It's quite handy for manipulating images for your layout.
#css #css_tips #web #web_dev #web_development #web_developer #front_end #front_end_designer #front_end_tip #designer #tutorials #learn_coding #coding #programming, #css_trick, #web
#css #css_tips #web #web_dev #web_development #web_developer #front_end #front_end_designer #front_end_tip #designer #tutorials #learn_coding #coding #programming, #css_trick, #web