LoginSignup
2
2

More than 5 years have passed since last update.

Check and get a CSS3 propeties.

Posted at
        var CSS3Props = (function () {

            var ret = {},
                style = document.createElement('div').style,
                props = ['webkit', 'Moz', 'ms'],
                p, i = 0;

            //transform
            for (p; p = props[i]; i++) if (p + 'Transform' in style) {
                ret.TRANSFORM = p + 'Transform';
            }

            //transition
            for (i = 0, p = null; p = props[i]; i++) if (p + 'Transition' in style) {
                ret.TRANSITION = p + 'Transition';
            }

            return ret;
        }());
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2