9323 shaares
229 private links
229 private links
object-fit: cover;
is the one mostly used because it preserves the ratio of the image and it fits the dimension of the container.
There is multiple use cases:
- user avatars
- logos list
- article thumbnail
- hero background
- displaying videos
background-size
is for the background and has 3 values: auto
, contain
and cover
.