When we are using SVG in <img />
or as background, we may find it not stretch as expect.
To fix this, we can set preserveAspectRatio
to none
for the SVG. For example:
<svg preserveAspectRatio="none">
</svg>
See:
更新于 写于 HTMLCSS
When we are using SVG in <img />
or as background, we may find it not stretch as expect.
To fix this, we can set preserveAspectRatio
to none
for the SVG. For example:
<svg preserveAspectRatio="none">
</svg>
See: