crop picture css code example
Example 1: image crop using css 1:1
.img {
object-fit: cover;
object-position: 100% 0; //move image position in x direction.
object-position: 0 100%; //move image position in y direction.
}
Example 2: crop image css
.img {
object-fit: contain;
}
Example 3: how to crop images in css
img{
object-fit: cover;
}