IE显示透明度在高度> 4096px? [英] IE display transparency bug on height > 4096px?

查看:102
本文介绍了IE显示透明度在高度> 4096px?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如果页面很大,透明的叠加层将会显示一个透明的背景叠加层。为纯色(即不再透明)。我做了一些测试,发现这只发生在覆盖是大于4096像素高(hmmm,可疑,这是2 ^ 12)。



任何人都可以验证这个问题?



这是我的测试代码(我使用Prototype):

 < style> 
.overlayA {
position:absolute;
z-index:10;
width:100%;
height:4095px;
top:0px;
left:0px;
zoom:1;
background-color:#000;
filter:alpha(opacity = 10);
-moz-opacity:0.1;
opacity:0.1
}

.overlayB {
position:absolute;
z-index:10;
width:100%;
height:4097px;
top:0px;
left:0px;
zoom:1;
background-color:#000;
filter:alpha(opacity = 10);
-moz-opacity:0.1;
opacity:0.1;
}
< / style>
< div style =width:550px; height:5000px; border:1px solid#808080>
< a href =javascript://显示重叠广告Aonclick =Element.show('overlayA')>显示A = 4096h< / a>
< br />< a href =javascript:// show overlay Bonclick =Element.show('overlayB')>显示B = 4097h< / a>
< / div>
< div id =overlayAonclick =Element.hide(this)class =overlayAstyle =display:none>< / div>
< div id =overlayBonclick =Element.hide(this)class =overlayBstyle =display:none>< / div>


解决方案

你是间接使用DirectShow在封面下的alpha混合和图像组成。 DirectShow使用DirectX纹理,它对DX9有4096x4096的像素限制,这将解释这种不稳定的行为。


I was working on a JavaScript dialog with a transparent background overlay when I ran into a problem on large pages.

If the page was large, the transparent overlay would be a solid colour (i.e. no longer transparent). I did some testing and found this only happened in the overlay was greater than 4096 pixels high (hmmm, suspicious, that's 2^12).

Can anyone verify this issue? Have you seen a work-around?

Here's my test code (I'm using Prototype):

<style>
.overlayA { 
    position:absolute;
    z-index:10;
    width:100%;
    height:4095px;
    top:0px;
    left:0px;
    zoom: 1;
    background-color:#000;
    filter:alpha(opacity=10);
    -moz-opacity:0.1;
    opacity:0.1;
}

.overlayB { 
    position:absolute;
    z-index:10;
    width:100%;
    height:4097px;
    top:0px;
    left:0px;
    zoom: 1;
    background-color:#000;
    filter:alpha(opacity=10);
    -moz-opacity:0.1;
    opacity:0.1;
}
</style>
<div style="width:550px;height:5000px;border:1px solid #808080">
    <a href="javascript:// show overlay A" onclick="Element.show('overlayA')">Display A = 4096h</a>
    <br /><a href="javascript:// show overlay B" onclick="Element.show('overlayB')">Display B = 4097h</a>
</div>
<div id="overlayA" onclick="Element.hide(this)" class="overlayA" style="display:none"></div>
<div id="overlayB" onclick="Element.hide(this)" class="overlayB" style="display:none"></div>

解决方案

Since you have an opacity filter on the CSS I believe you are indirectly using DirectShow under the covers for alpha blending and image composition. DirectShow uses DirectX textures, which have a 4096x4096 pixel limit for DX9, which would explain this erratic behavior.

这篇关于IE显示透明度在高度&gt; 4096px?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆