1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Scale Images with object-fit

    cssCSS

    object-fit puts you in control of img and video aspect ratio. Images and videos have a source aspect ratios and those ratios can differ from their containers. object-fit has has values for scaling content to fit the available space of your layouts.