开发者

Firefox SVG from subdomain

I have a stylesheet that accesses an svg in the same directory as the stylesheet. Firefox will get the svg on my test server and on the subd开发者_C百科irectory. However, it refuses to attempt to download the svg when accessed from the subdomain.

I tried adding svg to the list of files in an .htaccess file on the subdirectory's highest level, which is also the solution to get firefox to accept @font-face from a subdirectory. I probably did this wrong, but I will include anyway.

<FilesMatch "\.(ttf|otf|eot|svg)$">
<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>

Thanks!

Edit, css rule being used:

.mask {
filter:url('mask.svg');
} 


A 'filter' property should always have a fragment part, otherwise it won't apply. You probably want something like:

.mask {
filter: url('mask.svg#myFilter');
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜