.SVG Browser Support

前端 未结 9 1177
臣服心动
臣服心动 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:38

    ... or you can let apache server dealing with it:

    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} MSIE\s[5-8]\.
    RewriteCond %{REQUEST_FILENAME} ^.+?\.svg$
    RewriteRule ^(.+?)\.(?:svg)$ $1\.png [L]
    

    you only have to create .png versions of every .svg file and it doesn't matter if the file is for css background or for an img tag.

提交回复
热议问题