Firefox not anti-aliasing scaled background svg

左心房为你撑大大i 提交于 2019-11-30 13:54:58

Give the outer <svg> element in the svg file (sophie-conran.svg) a width and height of 100%.

What happens is that the svg image is rasterised at the width and height you give it i.e. 1000px x 350px and that bitmap is then converted to the required size. If you make the width and height percentages then the bitmap is created at final size and there's no bitmap scaling.

Update:

This is all moot with Firefox 24 and beyond though, you can do what you like and it will always work properly i.e. without pixellation.

The solution is to include the SVG as a tag, not as an external file. Firefox will apply the anti-aliasing correctly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!