请看这个。
http://jsfiddle.net/snw5rgx9/3/
或这个新的 stackoverflow 代码片段。
.image {
float: left;
margin-right: 10px;
}
.text {
height: 100px;
position: relative;
}
.bottom-left {
position: absolute;
bottom: 0;
}
<div class="container">
<div class="image">
<img src="http://placehold.it/100x100" />
</div>
<div class="text">
asd
<div class="bottom-left">
Delete • Edit
</div>
</div>
</div>
我对左下角 float 的 div 的位置有疑问。
还有
X | Text
| Bottom
看起来像这样。
X | Text
Bottom
提前感谢您提供信息。
最佳答案
我不确定我是否完全理解这个问题,但尝试为 .text 添加 margin-left 的图像宽度 + 10 的值(对齐顶部文本,它有 10px margin-left,像这样:
.text {
height: 100px;
position: relative;
margin-left: 110px;
}
关于html - 将一个 div 放在 float div 的左下角,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26340702/