浏览器前缀

function getVendorPrefix() {
    var body = document.body || document.documentElement,
        style=body.style,
        vendor = ['webkit' , 'khtml' , 'moz' , 'ms' , 'o'],
        i = 0;
    while(i < vendor.length){
        if(typeof style[vendor[i] + 'Transition'] === 'string'){
            return vendor[i];
        }
        i++;
    }
}
var VendorPrefix = getVendorPrefix()

  

原文地址:https://www.cnblogs.com/jiebba/p/7263247.html