News Update :
Home » » Modernizr library for .svg

Modernizr library for .svg

By: Unknown on Sunday, 15 February 2015 | 08:00

If you use the .svg format, you must ensure that you have an alternative for browsers that do not support .svg
 

 




One technique is to use the library Modernizr
Which detects whether the browser supports .svg and if not, add a class that allows you to change the image path for a .png



CSS


.pomme {
    background-image: url('img/pomme.svg');
}
.no-svg .pomme {
    background-image: url('img/pomme.png');
}
 
Contact Us | Privacy policy | Term of use | Advertise with Us | Site map
Copyright © 2011. Blogging Brain . All Rights Reserved.
Design Template by Blogging Brain | | Powered by Blogger