【发布时间】:2014-09-22 01:09:20
【问题描述】:
我有以下 html 代码使“底部”div 浮动在图像顶部。我在一个表格行上有 3 张图像。
<td>
<img src="adele.jpg" alt="Adele">
<div id="bottom">
<h4 class="topText">ALBUM</h4>
<h3 class ="topText">ADELE 21 COVER </br> ADELE</h3>
</div>
</td>
这是我的 CSS:
#bottom{
position: absolute;
display: inline-block;
bottom: 0px;
left:0px;
}
#positionAnchor {
position: relative;
}
正如您在图片中看到的,顶部图片文本也没有正确浮动在图片顶部。
【问题讨论】:
标签: jquery html css css-float css-position