Skip to content
All Challenges
#54

Object Fit: Cover

Medium
Category: Box Model

Prevent image distortion inside fixed-size .cover-img using object-fit: cover.

Target HTML in preview:
<img class="cover-img" src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>" style="width:100px; height:100px;" />
Verification Criteria:
Set object-fit: cover
styles.css
Live Evaluation
Loading...
|
Live Browser Output
Sandboxed Preview