How can I test the browser that css3 is supported or not?
if(!css3){
//if at least one css3 feature isn't supported
//do stuff here
}
How can I test the browser that css3 is supported or not?
if(!css3){
//if at least one css3 feature isn't supported
//do stuff here
}
Try to assign a CSS3 property (that's relevant to what you're doing - no sense testing transition
if you're actually just doing transform
), andthen immediately check to see if the value "stuck". If the browser supports what you gave it, it will stick. Otherwise, it will change back to an empty string.
No browser supports all the features of CSS3 but some of the features are supported by browsers.
You may check this:-
We now have HTML5 and CSS3. No browser supports every feature so it’s often necessary to include shims or use detection techniques to ensure cross-browser compatibility