我已经构建了一个Javascript轮播,当用户点击左箭头或右箭头时,它会在持有人DIV中滚动UL,并将溢出设置为隐藏。
HTML如下:
<div id="promo-carousel-holder">
<ul>
<li class="promo-item">
<img src="_includes/images/promo-tyre-image.jpg" alt="" />
<h4><strong>30% off</strong> Title</h4>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. <a href="#" class="promo-link">View Offer</a></p>
</li>
<li class="promo-item">
<img src="_includes/images/promo-tyres-image.jpg" alt="" />
<h4><strong>30% off</strong> Title</h4>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. <a href="#" class="promo-link">View Offer</a></p>
</li>
<li class="promo-item">
<img src="_includes/images/promo-tyre-image.jpg" alt="" />
<h4><strong>30% off</strong> Title</h4>
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium. <a href="#" class="promo-link">View Offer</a></p>
</li>
</ul>
</div>
在IE6,IE7,Firefox,Opera,Chrome和Safari中一切正常,但在IE8中,P标签内的文本底线不服从溢出:隐藏,尽管其余内容遵守规则。
我看了一眼,但似乎无法找到任何关于这个特定错误的提及。还有其他人遇到过类似的东西吗?
答案 0 :(得分:8)
啊,事实证明我将DIV设置为绝对定位。将其更改为亲戚并且有效。不确定我是如何忽视这一点的。奇怪IE8是唯一一个引起问题的浏览器!