CSS object-fit

Previous Next

Demo of the different values of the object-fit property.

Click the property values below to see the result:

object-fit: none;
object-fit: fill;
object-fit: contain;
object-fit: cover;
object-fit: scale-down;
Pineapple
Pineapple
Pineapple
Pineapple
Pineapple

Play more with the code in our Tryit yourself editor: Try it Yourself ❯