Skip to content

Commit c8b0b18

Browse files
committed
Add note on preserveAspectRatio for SVG
1 parent fc8c7bf commit c8b0b18

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

animations/svg.md

+8
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@ Morphing is changing the coordinate values of a paths. Here are some examples:
2222
- Svg provides fallback for non supporting browsers with `switch` and `foreignObject`. [This tweet by Sara Soueidan for more](https://twitter.com/SaraSoueidan/status/875112721922043904)
2323
- Export SVG to Gif with Chris Gannon's tool [here](https://github.com/chrisgannon/SVG2GIF)
2424

25+
26+
## Snippets
27+
Using preserveAspectRatio:
28+
```
29+
preserveAspectRatio="xMidYMid meet" => background-size: contain
30+
preserveAspectRatio="xMidYMid slice" => background-size: cover
31+
```
32+

0 commit comments

Comments
 (0)