DEV Community

loading...

How to use the object-fit CSS property to scale images responsively

Alex Carpenter
I am a self taught developer that works best when floating in between design and engineering teams. I enjoy sharing what I know via short instructional screencasts and the occasional written post.
Originally published at alexcarpenter.me ・1 min read

View the demo code: https://codepen.io/alexcarpenter/pen/YzXeEbV

object-fit browser support: https://caniuse.com/#search=object-fit

Discussion (1)

Collapse
valix85 profile image
Valerio

Great work! beauty youtube channel 👍