css - SVG for background -


i tried use svg background , works in local not when upload ftp.

it has png fallback ie , others not support svg. in cases see png.

(just example use red square svg , different think logo of skype.png fall back): http://jsfiddle.net/sng8w/ http://codepen.io/pen/9135/2

how put svg in in background?

html:

<div id="quadrat"></div>​ 

css:

#quadrat {   position: absolute;   top: 20px;   left: 20px;   width: 400px;   height: 400px;   line-height:200px;   background-image:  url('http://mig-marketing.com/proves/retina/skype.png');   background-image:  none,url('http://mig-marketing.com/proves/retina/rectangle.svg'), url('http://mig-marketing.com/proves/retina/skype.png');   background-size: 100% 100%;   background-repeat:no-repeat; }​ 

you serving svg image 'text/xml' mediatype. while that's technically fine, it's quite possible browsers disallow in scenarios one, images allowed. try configuring server send official svg mediatype 'image/svg+xml' instead, should work.

some more details how configure webserver can found e.g here.

update: added link svg image gets served 'text/xml'.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -