Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当我使用jQuery设置元素';在IE6或IE7中,它的不透明度似乎是;溢出:隐藏";。为什么?_Jquery_Css_Cross Browser_Internet Explorer 7_Opacity - Fatal编程技术网

当我使用jQuery设置元素';在IE6或IE7中,它的不透明度似乎是;溢出:隐藏";。为什么?

当我使用jQuery设置元素';在IE6或IE7中,它的不透明度似乎是;溢出:隐藏";。为什么?,jquery,css,cross-browser,internet-explorer-7,opacity,Jquery,Css,Cross Browser,Internet Explorer 7,Opacity,考虑以下HTML: <!DOCTYPE html> <html> <head> <title></title> <style type="text/css"> div { position: relative; width: 200px; height: 200px;

考虑以下HTML:

<!DOCTYPE html> 
<html> 
    <head> 
        <title></title> 
        <style type="text/css"> 
        div {
            position: relative;
            width: 200px;
            height: 200px;
            background: #ff0;
        }
        span { 
            position: absolute;
            width: 200px;
            height: 200px;
            background: #f00;
            top: 100px;
            left: 100px;
        }
        </style>
    </head> 
    <body> 
        <div><span></span></div> 
    </body> 
</html> 
现在输出如下:

我怎样才能避免这种情况


编辑:它也发生在IE6中。

我发现,如果您清空
过滤器
属性,问题就会消失

$('div').css('opacity', '1').css('filter', '');

$('div').css('opacity', '1').css('filter', '');
$('div').animate({ opacity: '1' }, function() { 
    $(this).css('filter', '')
});