IE.Jquery图像/swf交换中的Css问题

IE.Jquery图像/swf交换中的Css问题,jquery,css,internet-explorer,debugging,flash,Jquery,Css,Internet Explorer,Debugging,Flash,我有以下代码: <html> <head> <script type="text/javascript" language="javascript" src="jquery/jquery-1.5.1.js"></script> <script type="text/javascript" language="jav

我有以下代码:

                <html>
                <head>
                <script type="text/javascript" language="javascript" src="jquery/jquery-1.5.1.js"></script> 
                <script type="text/javascript" language="javascript" src="http://jquery.thewikies.com/swfobject/jquery.swfobject.1-1-1.min.js"></script>
                <style>
                div#test{background:#ffffff;width:360px;height:360px;display:none;z-index:5;position: fixed;}
                #mainimage{z-index:-1;}
                </style>
                </head>
                <body>
                <table border="1">
                    <tr>
                        <td><div id="test"></div>
                            <div id="mainimage"><img id="full_image" src="1.jpg" alt="0" width="360" height="360" border="0" /></div>
                            <span id="flash" style="width:360px;height:360px;border:0px;margin:0px;padding:0px;z-index:-1;">
                            <object data="fireworks.swf" type="application/x-shockwave-flash" id="flash_99458582" width="360" height="360">
                                <param name="movie" value="fireworks.swf"><param name="wmode" value="opaque">
                            </object>
                            </span>
                        </td>
                        <td>
                            <table>
                                <tr>
                                    <td><a href="1.jpg" class="thumbnail"><img src="1.jpg" width="70" height="70"></a></td>
                                </tr>
                                <tr>
                                    <td><a href="2.jpg" class="thumbnail"><img src="2.jpg" width="70" height="70"></a></td>
                                </tr>
                                <tr>
                                    <td><img src="3.jpg" width="70" height="70" class="video"></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>    
                <br /><br />
                <script type="text/javascript">
                $(document).ready(function() {
                    $("#flash").hide();
                    $('a.thumbnail').click(function(){  
                    var src = $(this).attr('href');

                    $("#test").fadeIn("slow", function () {
                        //$("#test").fadeOut("slow");
                        $("#flash").hide();
                        $("#test").hide();
                        $("img#full_image").show();
                        $("img#full_image").css({ opacity: 0 });
                        //alert(src);
                        if (src != $('img#full_image').attr('src').replace(/\?(.*)/,'')){
                            $('img#full_image').attr('src', src+'?'+Math.floor(Math.random()*(10*100)));                
                        }

                        $('img#full_image').stop().animate({opacity: '1'}, 'slow');
                    });



                    //alert("here");
                    return false;
                    });     
                    $('img.video').click(function(){
                        $("img#full_image").fadeOut("slow", function () {
                            $("#test").show();
                            $("#flash").show();
                            $("img#full_image").hide();
                            $("#test").fadeOut("slow");

                        }); 
                        return false;

                    });

                });
                </script>
                </body>
                </html>

div#test{背景:ffffffff;宽度:360px;高度:360px;显示:无;z索引:5;位置:固定;}
#主映像{z-index:-1;}


$(文档).ready(函数(){ $(“#flash”).hide(); $('a.缩略图')。单击(函数(){ var src=$(this.attr('href'); $(“#测试”).fadeIn(“慢”,函数(){ //$(“#测试”)。淡出(“缓慢”); $(“#flash”).hide(); $(“#测试”).hide(); $(“img完整图像”).show(); $(“img#full_image”).css({opacity:0}); //警报(src); if(src!=$('img#full#u image').attr('src')。替换(/\?(*)/,''){ $('img#full#u image').attr('src',src+'?')+Math.floor(Math.random()*(10*100)); } $('img#full_image').stop().animate({opacity:'1'},'slow'); }); //警报(“此处”); 返回false; }); $('img.video')。单击(函数(){ $(“img#full#u image”).淡出(“慢”,函数(){ $(“#测试”).show(); $(“#flash”).show(); $(“img#full#u image”).hide(); $(“#测试”)。淡出(“缓慢”); }); 返回false; }); });
这基本上有一些拇指,当你点击它时,它被加载为一个主图像。单击时,还有一个加载swf文件的拇指。当加载主图像/swf时,我也有淡入/淡出效果。这在chrome和firefox中都有效,但当我尝试IE时,jquery加载的div会向下推送内容。有人能帮忙调试这个吗


谢谢

您没有doctype,因此您的页面正在使用

添加HTML5 doctype作为第一行:

<!DOCTYPE html>

我并没有测试这是否能解决你的问题,但机会很大


例如,您使用的是
position:fixed
,它在IE的怪癖模式下不起作用。

您的覆盖(div或image)需要绝对/固定定位。onclick上显示的图像标记不是。你的测试版工作正常吗?天哪!!!我从来不知道这件事。哈哈。谢谢你每天都能学到新东西!!!!这解决了问题。