-2

我的网站在 Chrome/Firefox 中运行良好,但在 IE8 的页面中间拉出了一个小白框。

注意:我已经使用 IE8访问了演示站点,并且 ajax 调用工作正常。我不确定我哪里出错了。

这是我用来启动 Fancybox 的脚本...

    $(document).ready(function() {

        $('.fancybox').fancybox();

        // Change title type, overlay closing speed
        $(".fancybox-effects-a").fancybox({
            helpers: {
                title : {
                    type : 'outside'
                },
                overlay : {
                    speedOut : 0
                }
            }
        });
    });
4

2 回答 2

1

查看您的 ajax 内容页面的 HTML,它似乎不是 W3C 有效的。Internet Explorer 8 可能会对此进行一些验证...

删除最后的额外关闭</div>

已验证此页面:http ://webfro.gs/south/tour3579/ajax/associate-ba.html

于 2013-10-31T22:13:44.367 回答
0

一些 js 错误可能会阻止 fancybox 工作,尤其是 IE,它比其他浏览器的容忍度更低。

在您的情况下,zoomflow.js文件有许多console.log在 IE 上下文中无效的命令,因此它们会触发 js 错误。

例子 :

console.log("this demo doesn't work in IE");
$(".fancybox").fancybox();

JSFIDDLE;在大多数现代浏览器中都可以正常工作,但 IE[7-9]

于 2013-10-31T22:58:23.980 回答