CSS Object-position

CSS Object-position property specifies the alignment of the selected replaced element’s contents within the element’s box.

img {
  width: 200px;
  height: 300px;
  object-fit: cover;
}

Object-position Property

The object-position property is then used to align the contents of the image inside the image box. We will use the object-position property to position the image so that the bird is in center:

CSS Object position
img {
  width: 300px;
  height: 400px;
  object-fit: cover;
  object-position: 70% 100%;
}

 we will use the object-position property to position the image so that the flower is in center:

img {
  width: 300px;
  height: 400px;
  object-fit: cover;
  object-position: 25% 100%;
}