Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
152
rated 0 times [  154] [ 2]  / answers: 1 / hits: 16762  / 15 Years ago, thu, august 27, 2009, 12:00:00

Is it possible in JavaScript to know if a CSS property is supported by the client browser? I'm talking about the rotation properties of CSS3. I want to execute some functions only if the browser supports them.


More From » css

 Answers
116

I believe you can do it this way:



if ('WebkitTransform' in document.body.style 
|| 'MozTransform' in document.body.style
|| 'OTransform' in document.body.style
|| 'transform' in document.body.style)
{
alert('I can Rotate!');
}

[#98818] Sunday, August 23, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kaylinshayd

Total Points: 443
Total Questions: 104
Total Answers: 111

Location: Nauru
Member since Wed, Mar 29, 2023
1 Year ago
;