How to use CSS object-fit to control your images

Kevin Powell
Kevin Powell
426.9 هزار بار بازدید - 6 سال پیش - Object-fit allows you to control
Object-fit allows you to control your image in much of the same way you can do with background-image and background-size, but with even more properties at its disposal! It gives us 'cover' and 'contain' as well as 'fill', 'scale-down' and 'none', and 'none' works in a totally unexpected way (it's not the default!)

And the intro thing... that's what happens when you're doing the final touches when you should have been in bed 3 hours earlier, lol.

#fiveminutefriday

---

I have a newsletter! https://www.kevinpowell.co/newsletter

New to Sass, or want to step up your game with it? I've got a course just for you: https://www.kevinpowell.co/learn-sass

---

My Code Editor: VS Code - https://code.visualstudio.com/

How my browser refreshes when I save: How to automatically refresh your bro...

---

Support me on Patreon: Patreon: kevinpowell

I'm on some other places on the internet too!

If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.

Instagram: Instagram: kevinpowell.co
Twitter: Twitter: KevinJPowell
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell
6 سال پیش در تاریخ 1397/07/20 منتشر شده است.
426,937 بـار بازدید شده
... بیشتر