.SVG Browser Support

前端 未结 9 1172
臣服心动
臣服心动 2020-12-01 01:35

I\'m working on a responsive design and I\'m thinking of creating navigation icons as .svg files. What is current browser support like and is there a workaround/plugin for o

9条回答
  •  日久生厌
    2020-12-01 01:55

    You could as well use SVGs in general for all images. That way you'd cover all retina stuff on iDevices. Other devices will follow sooner or later.

    For browsers that do not support svg, you could give the body a class of 'no-svg'.

    In your css just add a '.no-svg .yourimageclass' and place a png instead.(override it)

    Boilerplate HTML5 gives you that no-svg class already by default with some javascript magic. (e.g. for IE8)

提交回复
热议问题