0

我正在为当地企业慈善机构开发一个网站,但在 ie7 中让一切正常工作时遇到了问题。它适用于我测试过的所有其他浏览器,并在通过 w3 的验证器时通过。

我在左侧的导航在 ie7 中不起作用,当我查看下面的开发人员工具时,链接就在那里(当然它们在那里并且在其他浏览器中工作)。

此外,画廊滑块的 jquery 没有正确加载,显示正在查看的图片的按钮和项目符号在那里,但图像本身却没有!

这是网址http://www.youthenterprise.co.uk/newhullready/coded/gallery.php

我已经用谷歌搜索了这个问题的答案并检查了他们建议的所有小细节(移动我没有的 $document.ready,确保它设置为 text/javascript 而不是 application/javascript...)

4

1 回答 1

0

刚刚注意到你在 3-11 行的 orbit-1.2.3.css 中有这个

#featured, 1,2,3,4,5 { 
    width: 620px;
    height: 450px;
    background: #fff url('orbit/loading.gif') no-repeat center center;
    overflow: hidden;
    }
#featured, 1,2,3,4,5>img,  
#featured, 1,2,3,4,5>div,
#featured, 1,2,3,4,5>a { display: none; }

这导致第一个滑块(也称为#featured)断裂。我不能 100% 确定这段代码在哪里使用,但如果你删除/注释掉它,它应该可以解决你的 IE7 问题。

或者,如果您需要该代码,请重命名第一个滑块的 ID。

希望有帮助。

谢谢阿娇

编辑:也忘了提,你不需要为每个滑块添加脚本,你可以将它们添加到 head 标签:)

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Hull Ready - the future is ours</title>

<link href="style/style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="style/orbit-1.2.3/orbit-1.2.3.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script>
<script src="style/orbit-1.2.3/jquery.orbit-1.2.3.js" type="text/javascript"></script>

<!--[if IE 7]><link rel="stylesheet" href="style/ie7.css" type="text/css" /><![endif]-->

<script type="text/javascript">
$(window).load(function() {
$('#featured').orbit();
$('#featured1').orbit();
$('#featured2').orbit();
$('#featured3').orbit();
});
</script>
</head>
于 2012-10-16T09:16:44.470 回答