markdown 在Safari上扩展SVG

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 在Safari上扩展SVG相关的知识,希望对你有一定的参考价值。

# Scale SVG on Safari

[SOURCE](https://stackoverflow.com/a/24303532/1602807),
[SOURCE](https://css-tricks.com/scale-svg/)

Safari has trouble scaling SVG image so it will distort image if use with attribute like `object-fit: cover;`. To fix this add `preserveAspectRatio="none"` to the `<svg>`:

```
<svg width="200" height="200" viewBox="0 0 200 200" fill="none" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
```

以上是关于markdown 在Safari上扩展SVG的主要内容,如果未能解决你的问题,请参考以下文章