我们在右侧导航栏中有一个新闻滚轮http://www.businesseventsydney.com.au/home-page-test.cfm 。它在 FF 和 Chrome 中运行良好,但在 IE 中,新闻故事相互冲突。
有人可以阐明它可能出了什么问题吗?
我们在右侧导航栏中有一个新闻滚轮http://www.businesseventsydney.com.au/home-page-test.cfm 。它在 FF 和 Chrome 中运行良好,但在 IE 中,新闻故事相互冲突。
有人可以阐明它可能出了什么问题吗?
添加position:relative
到div.latest-news-container
这似乎在 IE8 中可以正常工作,您使用的是什么版本?
无论如何,我能够重现将其置于兼容模式或 IE7 模式。
确定问题后,似乎div
已overflow: hidden
正确设置的容器设置为非常大的高度。这就是div
我所指的:
<div class="latest-news-content" style="visibility: visible; overflow: hidden; position: relative; z-index: 2; left: 0px; height: 399px; ">
我将高度设置为130px
,它似乎解决了这个问题。更有趣的问题是为什么这不是在所有浏览器中都发生,我还没有调查。
有时 IE 版本和其他浏览器在像素间距方面存在差异。解决此问题的方法是为ul
andli
元素设置 IE 特定样式。我建议您将当前的行 css 包装起来(无论如何):
<ul style="top: -465px; height: 1380px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; list-style-type: none; position: relative; z-index: 1; ...
<li style="width: 199px; height: 115px; overflow: hidden; float: none; ...
到单独的类中,并在 IE 9 浏览器中将它们切换为修改版本。您可能只需要调整元素的值top
和元素的ul
height
li