On 3/6/14, 6:54 PM, Philippe Wittenbergh wrote:
Le 7 mars 2014 à 11:23, John <j...@coffeeonmars.com> a écrit :
.is some kind of css required to show the png on those browsers that won't
handle the svg file? I guess something for IE?
But this reminds me - older Android (2.x and 3 iirc) also doesn't support SVG
at all, and tends to choke when parsing a CSS file that contains references
to SVG images. In this case, you're put of luck with CSS hackery. I use
Modernizr to detect SVG support, and then use the generated class to target
as needed.
> Example
> .nosvg E { background: url(image.png) no-repeat red; } /* <— IE < 9, old
android */
> .svg E { background: url(image.svg) no-repeat red; } /* modern browsers, SVG
file */
>
You may like to add .no-js as well - just in case. :)
.no-js E,
.no-svg E { background: url(image.png) no-repeat red; }
Also, check out this article:
<http://css-tricks.com/svg-fallbacks/>
--
Cordially,
David
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/