Skip to content

Commit 073ec98

Browse files
committed
Update css-practice.md
1 parent 19f46ea commit 073ec98

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

css-practice.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,16 @@ Pick ONE OR MORE options
10581058
4. object-fit: cover;' avoids clipping the image by sacrificing the aspect ratio.
10591059
```
10601060

1061+
<details><summary><b>Answer</b></summary>
1062+
1063+
```css
1064+
2. 'object-fit: contain;' preserves the aspect ratio of the image and makes sure no clipping happens to the whole image.
1065+
1066+
3. object-fit: cover;' avoids the image getting squeezed, but it could end up clipping the image.
1067+
```
1068+
1069+
</details>
1070+
10611071
<div align="right">
10621072
<b><a href="#">↥ back to top</a></b>
10631073
</div>

0 commit comments

Comments
 (0)