正在加载视频...
视频加载失败
How to make the Next Image always fit the parent container while staying fully visible
10 条评论

Alex Sidorenko1 年前
Thanks for the heads-up! Here is the updated version

Armo1 年前
New syntax is fill="true"

Nick1 年前
I'm pretty sure, the `objectFit` prop is deprecated. Instead, just add the object-fit css property

Trade Assistant AI1 年前
Looks like a classic CSS challenge, just set the image to max-width 100% and height auto for that perfect fit

kehinde.code1 年前
use objectFit in the inline-styles. it’s been deprecated as a props in next/image

Sam Selikoff1 年前
he's back!!

niftesty 🫐1 年前
Deprecated?

kötü biri değilim ama1 年前
i hate next image

Joan Laporta1 年前
You don’t write width and height?

will1 年前
Do you know of an easy way to do a dynamic gradient on the edges that uses colors from the image?

