不兼容ie
var theUA = window.navigator.userAgent.toLowerCase();
if ((theUA.match(/msie\s\d+/) && theUA.match(/msie\s\d+/)[0]) || (theUA.match(/trident\s?\d+/) && theUA.match(/trident\s?\d+/)[0])){
var ieVersion = theUA.match(/msie\s\d+/)[0].match(/\d+/)[0] || theUA.match(/trident\s?\d+/)[0];
if (ieVersion < 9) {flag = false;alert('这是IE: ' + ieVersion);};
}
var setCoverOpacity = function() {
flag ?
$body.find('.search-box-cover')[0].style.opacity = (((getScrollTop() / 550) > 0.9) ? 0.9 : (getScrollTop() / 550)) :
$body.find('.search-box-cover')[0].style.filter = 'Alpha(opacity='+ (((getScrollTop() / 550) > 0.9) ? 0.9 : (getScrollTop() / 550))*100 +')';
}flag是判断浏览器是否为IE8及以下,然后做了IE8及以下的透明渐变处理,由于IE8不支持position:fixed;所以我也没测试出来到底生效没,只是提供解决一个方法