jQuery   发布时间:2022-03-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了jquery – 从Twitter IE7 bug引导大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我在IE7中创建的网站发现了一个错误.

网址:http://moldipaints-dokkum.nl/productcontroller/getProductList/19

在IE7中打开产品时,自举模式位于页面的后面,灰色的叠加层位于顶部.图像位于模态之上.

我改变了以下几点:

css位置:相对/绝对/固定(只有模态不正确显示)

css z-index :(没有任何区别)

潜在修复Twitter(Github); http://jsfiddle.net/ATeaH/8/

这些都不正确.我能做些什么来做这个工作

从项目更新代码

页面呈现

<?PHP
    if(isset($productByTypE)){
        $countwidth = (count($productByTypE) / 2)*260+100;
    }?>



    <div class="productView">
        <div class="aligndiv">
           <div class="productcenter">
               <div class="productenview">
                   <div class="productcontainer" style="width:<?=@$countwidth?>px;" >
                       <?PHP
                       if(!empty($productByTypE)){
                       for($i=0;$i < count($productByTypE); $i++){

                       $id = $productByType[$i]['id'];
                       $title = $productByType[$i]['title'];
                       $img = base_url('/img/producten/'.$productByType[$i]["img"]);

                       if($i % 2 == 0){
                          echo '<div class="seperatorforproduct">';
                       //0,2,4,6,8
                       }

                    echo '<div class="button btnstyle">';
                    echo '<div class="imgbtn">';    
                    //  <!-- afbeelding -->
                    echo '<img src="'.$img.'" title="'.$title.'" alt="'.$title.'" data-toggle="modal" href="#modal'.$id.'" />';
                    echo '</div>';  
                    echo '<div class="txtbtn txtstyle">';   
                    echo '<a class="btn" data-toggle="modal" href="#modal'.$id.'" >'.$title.'</a>';
                    echo '</div>';
                    echo '</div>';
                    ?>
                    <div class="modal" style="display:none;" id="modal<?=$id?>">
                        <div class="modal-header">
                            <a class="close" data-dismiss="modal">&times;</a>
                            <h2><?=$title?></h2>
                        </div>
                        <div class="modal-body">
                            <div class="modal-left">
                            <img src="<?=$img?>" title="<?=$title?>" alt="<?=$title?>" />
                            </div>
                            <div class="modal-right">
                            <p><?=$productByType[$i]['info']?></p>
                            </div>
                        </div>
                        <div class="modal-footer">
                            Neem contact op met Moldipaints-Dokkum.nl voor meer informatie,telefoonnummer: 0519-297409
                        </div>
                    </div>

                    <?PHP
                    if($i % 2 == 1 || $i == count($productByTypE)){
                        // 0,3,9,12
                        echo '</div>';
                    }
                }      
            }?> 
        </div>
    </div>
</div>

CSS引导

.modal-BACkdrop {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      z-index: 10;
      BACkground-color: #000000;
    }
    .modal {
      position: absolute;
      top: 50%;
      left: 50%;
      z-index: 1000;
      min-height: 500px;
      width: 700px;
      margin: -275px -380px;
      BACkground-color: #ffffff;
      border: 1px solid #999;
      border: 1px solid rgba(0,0.3);
      *border: 1px solid #999;
      /* IE6-7 */

      -webkit-border-radius: 6px;
      -moz-border-radius: 6px;
      border-radius: 6px;
      -webkit-Box-shadow: 0 3px 7px rgba(0,0.3);
      -moz-Box-shadow: 0 3px 7px rgba(0,0.3);
      Box-shadow: 0 3px 7px rgba(0,0.3);
      -webkit-BACkground-clip: padding-Box;
      -moz-BACkground-clip: padding-Box;
      BACkground-clip: padding-Box;
      }

CSS样式项目

/*   Producten   */
    .productView{position:absolute; width:100%; height:700px; top:50px; margin:auto;}
    .aligndiv{position:relative; width:1024px; margin:auto;}
    .productcenter{width:1024px; height:500px; margin:auto;}
    .productenview{position:relative; width:480px; height: 600px; overflow-x:scroll; overflow-y:hidden; float:left; left:10%; margin:auto; margin-right:300px}
    .productcontainer{height: 400px; margin-top:90px; z-index:0;}
    .productmenu{position:absolute; width:300px; top:100px; right:5%; z-index:0;}
    .seperatorforproduct{position:relative; width:240px; height:480px; float:left;}

先谢谢你

解决方法

我在IE7中的模态弹出窗口遇到了同样的问题.模态对话框显示在模式背景下.但是,添加此JavaScript DID可以解决我的问题:
$('.fixedVersion .modal').appendTo($("body"));

更多细节在这里http://jsfiddle.net/ATeaH/8/

大佬总结

以上是大佬教程为你收集整理的jquery – 从Twitter IE7 bug引导全部内容,希望文章能够帮你解决jquery – 从Twitter IE7 bug引导所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。