[英]getComputedstyle - IE8 issue
如何使此代码在IE8(以及可能的话)下工作?
return parseInt(window.getComputedStyle(indicator).getPropertyValue('z-index'), 10);
将其添加到您的代码中:
if( !window.getComputedStyle) {
window.getComputedStyle = function(e) {return e.currentStyle};
}
此外,您可以使用getComputedStyle(indicator).zIndex
以跨浏览器方式获取属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.