87,899
社区成员
发帖
与我相关
我的任务
分享
function isSupport(attr) {
return ['', 'webkit-', 'ms-'].some(function(prefix) {
var prefixed = (prefix + attr).replace(/-([a-z])/g, function(_, $1) { return $1.toUpperCase(); });
return prefixed in document.documentElement.style;
});
}
var isSupport = isSupport('scroll-snap-type') && isSupport('scroll-snap-coordinate');