Blurry SVG images in chrome for Android

前端 未结 4 1648
误落风尘
误落风尘 2020-12-08 05:26

To escape the hell of different pixel densities in mobile phones, I use SVG-files as background images in my css.

Chrome for android seems to render inline-svg

4条回答
  •  春和景丽
    2020-12-08 05:44

    If you are inserting a SVG file, the file will be (depending on the host, Wikipedia for example) pre-rendered. So therefore on load, the image will render for the size given. Inline SVG (Directly Coded into page) will re-size when the page re-sizes. But, I'm not sure about mobile browsers as they don't resize the elements in the page, they just "zoom"

    So basically what you're doing is painting an SVG onto a Canvas (pun!) then zooming a canvas. Inline has the direct SVG... so better....

提交回复
热议问题