Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.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
cssdivoverlay和jQuery_Jquery_Css_Overlay - Fatal编程技术网

cssdivoverlay和jQuery

cssdivoverlay和jQuery,jquery,css,overlay,Jquery,Css,Overlay,这或多或少是一个问题,但我正在使用它。好的,基本上我得到的是: <div style="overflow: hidden; width: 1000px; height: 450px; background-color: rgb(0, 0, 0); position: relative;" id="wrapper"> <div style="background-color: rgb(255, 255, 255); opacity: 0.9; top:

这或多或少是一个问题,但我正在使用它。好的,基本上我得到的是:

<div
  style="overflow: hidden; width: 1000px; height: 450px; background-color: rgb(0, 0, 0); position: relative;"
  id="wrapper">
    <div
      style="background-color: rgb(255, 255, 255); opacity: 0.9; top: 0pt; left: 0pt; width: 1000px; height: 450px; position: absolute; z-index: 500;"
      id="mask"></div>
    <div
      class="ui-draggable"
      style="margin: 60px auto auto; position: relative; width: 1550px; height: 340px;"
      id="test">
        <div style="float: left; margin-left: 10px; width: 100px; position: relative;" class="row">
            <div
              style="width: 100px; height: 100px; margin-top: 10px; position: relative;"
             ><img
                 style="width: 100px; height: 100px; position: relative;"
                 class="img"
                 src="/images/Chrysanthemum.jpg"></div>
            <div
              style="width: 100px; height: 100px; margin-top: 10px; position: relative;"
            ><img
                 style="width: 100px; height: 100px; position: relative;"
                 class="img"
                 src="/images/Desert.jpg"></div>
            <div
              style="width: 100px; height: 100px; margin-top: 10px; position: relative;"
            ><img
                style="width: 100px; height: 100px; position: relative;"
                class="img"
                src="/images/Hydrangeas.jpg"></div>
        </div>
        <div style="float: left; margin-left: 10px; width: 100px; position: relative;" class="row">
            <div
               style="width: 100px; height: 100px; margin-top: 10px; position: relative;"
            ><img
                style="width: 100px; height: 100px; position: relative;"
                class="img"
                src="/images/Jellyfish.jpg"></div>
            <div
              style="width: 100px; height: 100px; margin-top: 10px; position: relative;"
            ><img
                style="width: 100px; height: 100px; position: relative;"
                class="img"
                src="/images/Koala.jpg"></div>
            <div
               style="width: 100px; height: 100px; margin-top: 10px; position: relative;"
            ><img
                style="width: 100px; height: 100px; position: relative;"
                class="img"
                src="/images/Lighthouse.jpg"></div>
        </div>
    </div>
</div>
<div
   style="position: absolute; left: 978px; top: 223px; color: rgb(255, 255, 255);"
   id="next-btn">Next</div>
<div
   style="position: absolute; left: 8px; top: 223px; color: rgb(255, 255, 255);"
   id="prev-btn">Prev</div>

下一个
上
我对mask div所做的是让它覆盖整个包装。因此,我将其宽度和高度设置为包装的高度。这在Firefox、Chrome和Safari中运行良好

但是,在Internet Explorer中,它不起作用。我怎样做这个覆盖层


我试着将位置设置为绝对位置,除了一件事外,其他的都很好。这个面具上面有东西。它的位置是相对的。我将顶部的一个设置为z索引1000,将遮罩设置为500。然而,Internet Explorer中似乎存在一个bug,它会自动将绝对div置于一切之上。

哪个版本的IE?无论如何,你可以用另一个绝对对象覆盖你的绝对对象,然后把相对内容放在里面

然而,似乎ie中有一个bug,它会自动使绝对div成为一切的首选

不是。问题是Internet Explorer。您必须将以下样式添加到您的mask DIV中,以使其在IE中也能工作:

filter: alpha(opacity=90);
另外,请阅读和以获取有关如何正确实现不透明度的更多提示


另一方面,您应该少使用内联样式。这会让你的代码变得凌乱,难以调试。

在问题中包含这些元素的css,只需粘贴它,和/或包含一个链接,指向你在网上的位置。ngreenwood6,如果你不奖励他们的努力,为什么有人应该给你答案?我不是对你无礼或无礼,我只是邀请你通过充分参与StackOverflow.updated代码和生成的源代码的输出来改善你和其他人的体验。这几乎是一个照片库,但我发现的另一个问题是,当我为图像设置单击事件时。但是,当图像在ff中单击时,效果很好,但在ie中,它下面的其他图像会向下移动。我讨厌IE。我必须将图像保留为相对的,因为我正在相对地移动它,因为它在页面上的偏移量。绝对搞糟了。林伍德6,也要小心你对谁无礼:)这里有一个可以在这个问题上帮助你的人的名单:不太长,但50%的名字应该看起来很熟悉:)再次,如果你不打算对我的问题做出贡献,不要回答我正在使用ie8。我不能使用另一个绝对对象,因为我使用的对象是相对的,必须保持这种状态。我现在正在更新原始代码。