1
看看这个:http://jsfiddle.net/unimous/88uqJ/如何使用CSS将元素放置在另一个元素的底部?
<div id="d1">
<div id="d2">
</div>
</div>
#d1 {
height: 3000px;
background-color: red;
}
#d2 {
background-color: green;
height: 40px;
width: 40px;
position: absolute;
bottom: 0px;
}
我要让格D2出现在D1的底部,屏幕不是底部。
为什么position: absolute
在这里不起作用?
tl; dr Add'#d1 {position:relative; }' –