0

我有这样的 HTML 代码:

.caption-right
{
    width:102px;
    height:18px;
    background:transparent;
    position:absolute;
    z-index:100;
    margin: 44px 0 0 0;
}

.Topview-Items .Topview-Items-Item .WrapImage{
    width:104px;
    height:64px;
    border:#dadada 1px solid;
}
.Topview-Items .Topview-Items-Item .Images{
    width:102px;
    height:62px;
    padding:1px;
    overflow:hidden;
}
.Topview-Items .Topview-Items-Item img{
    width:100px;
    height:60px;
    border:none;
}
<ul>
    <li>
        <div class="Items">
            <div class="WrapImage">
                <div class="caption-right">
                    <span class="icon1"></span>
                    <a class="time" href="">4:03</a>
                </div>
                <div class="Images">
                    <img src="/images/images/rightColumnImg.gif" />
                </div>
            </div>
            <div class="text">
                <a href="">A good clips you should click to see</a>
                <p>20.000 visitors</p>
            </div>
        </div>
    </li>
    <li>..with the same content.</li>
</ul>

这是我的包装类和图像的css代码,当我在标题右类中将属性位置:绝对更改为位置:相对时,标题出现但不是图像。我只想在此剪辑图像上方显示视频剪辑时间的标题。它在 Firefox 和 Chrome 中运行良好,但在 IE 中运行良好。有人遇到问题,请告诉我如何修复此错误。

非常感谢!

4

1 回答 1

0

确保您的相关容器(可能是 Items 或 WrapImage)有一个宽度,至少首先要检查这是否是问题所在。我遇到的大多数 IE 问题通常是因为缺少宽度。

hasLayout 在尝试解决 IE 问题时很好了解hasLayout 或特定部分在这里相对定位的元素

于 2009-07-06T11:20:03.517 回答