CSS Dojo道場 · practice
All levels

Ratio the box, fit the image

Level 8 of 9

Your goal

Give the 320px-wide photo a 16 : 9 ratio (320 × 180) and fill it with object-fit: cover.

Must useaspect-ratioobject-fit
target content boxtarget outer edge (green = matched, red = not yet)
Feedback updates as you type, and your CSS is saved in this browser. Exact target numbers are in the Target panel.