Skip to content

Instantly share code, notes, and snippets.

@pocotan001
Created December 11, 2012 11:47
Show Gist options
  • Save pocotan001/4257983 to your computer and use it in GitHub Desktop.
Save pocotan001/4257983 to your computer and use it in GitHub Desktop.
ベンダープレフィックス調べる
var prefix = !getComputedStyle ? null : (function() {
var prefix = null, i = 0,
style = getComputedStyle(document.documentElement, null);
while (style[i++]) {
if (style[i].charAt(0) === '-') {
prefix = style[i].split('-')[1];
break;
}
}
return prefix;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment