怎么可以点击一个位置:固定;身高:100%;宽度:IE8中覆盖100%? [英] how is it possible to click through a position: fixed; height: 100%; width: 100% overlay in IE8?
问题描述
我有一个错误,我正试图缩小范围,并证明它是一个doozie。我正在进行模态叠加,在IE8中出于某些原因我可以点击直通,聚焦输入并选择下面的文字。
i have a bug i'm trying to narrow down and it's proving to be a doozie. i'm making a modal overlay and in IE8 for some reason i am able to click "through", focus inputs and select text underneath it.
在IE9,FF中, Chrome一切都按预期工作。不幸的是,我打了一个减少的测试用例(如下所示)在IE8中工作得很好。以前有没有人碰到这个bug?希望能节省一些时间。谢谢!
in IE9, FF, Chrome everything works as expected. unfortunately a reduced testcase i slapped together (shown below) works just fine in IE8. has anyone run into this bug before? hoping to save some time. thanks!
<!DOCTYPE html>
<html>
<head>
<style>
div {
background: pink;
position: fixed;
height: 100%;
width: 100%;
top: 0;
left: 0;
opacity: 0.5;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
}
</style>
</head>
<body>
<input type="text" />
<div></div>
</body>
</html>
推荐答案
想通了,我正在使用rgba()而不是比不透明度,因为我只需要背景来透明。
figured it out, i was using rgba() rather than opacity because i needed only the background to have transparency.
对于IE它使用-ms-filter生成渐变过滤器,这导致了问题。结果只是使用
for IE it generated gradient filter using -ms-filter which was causing the issue. ended up just using
background: url(/images/EBEBEBB3.png);
background: rgba(255,255,255,.7);
这篇关于怎么可以点击一个位置:固定;身高:100%;宽度:IE8中覆盖100%?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!