我无法理解这个麻烦的原因: 我正在使用图像 slider ,除 IE8 外一切正常。
这是网站:link .
<div id="slides">
<div class="slides_container">
<?php
foreach($images as $image)
echo "<a href='#'><img style='margin: 0 auto; z-index: 9999;' src='{$image}' /></a>";
?>
</div>
<a href="#" class="prev"><img src="images/prev.png" width="45" height="52" alt="Arrow Prev"></a>
<a href="#" class="next"><img src="images/next.png" width="45" height="52" alt="Arrow Next"></a>
</div>
#slides {
position:absolute;
top:15px;
left:4px;
z-index:100;
}
.slides_container {
margin-top: 30px;
width:765px;
height: 350px;
overflow:hidden;
position:relative;
display:none;
}
.slides_container a {
width:765px;
height:350px;
display:block;
}
.slides_container a img {
display:block;
}
因此,在 Chrome、Firefox 等中,我在 slider 中看到图像,但在 IE8 中我看不到任何图像。你能帮我找出问题所在吗?
附注我无法在 IE8 下检查它,因为我有 Linux。我只知道它在那里不起作用。
最佳答案
在“slides_container”DIV 中生成的 HTML 代码如下:
<div class="slides_container">
<a href='#'>
<img style='margin: 0 auto; z-index: 9999;' src='images/gallery/home/pic29.jpg'></img>
</a>
</div>
如您所见,图像标签未正确呈现。它应该没有关闭
</img>
标签。
修复后,它将在 Internet Explorer 中运行。
关于php - IE8 图像问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5869940/