Object Fit

Utilities for controlling how a replaced element's content should be resized.

Class CSS Output
object-contain
object-fit: contain;
}
object-none
object-fit: none;
}
object-fill
object-fit: fill;
}
object-cover
object-fit: cover;
}
object-scale-down
object-fit: scale-down;
}

object-contain

object-fit: contain;

object-none

object-fit: none;

object-fill

object-fit: fill;

object-cover

object-fit: cover;

object-scale-down

object-fit: scale-down;

Reference

object-fit MDN ↗

CSS Properties

  • object-fit