javascript - How to check if svg <g> element supports css transform -
chrome, firefox , safari supports tranformation of svg <g>
element css style without prefixes, while internet explorer , android 4.2.0 browser not support it.
i want check if browser supports feature or not javascript, example this:
if ( svg_css_transform_supported() ){ //do something; }else{ //do nothing; }
this jsfiddle tutorial running on supported browsers:
function svg_css_transform_supported() { var svg = document.createelementns("http://www.w3.org/2000/svg", "svg"); return 'transform' in svg; }
Comments
Post a Comment