div を別の div に追加し、絶対位置 (相対位置にすることはできません) を下に追加する必要があります。コードは次のようになります。
<div style="position:aboslute; top:100px; left:200px; height:500px">
<div style="height:20px">Example 1</div>
<div style="height:2px">Example 2</div>
</div>
ソリューション?
div を別の div に追加し、絶対位置 (相対位置にすることはできません) を下に追加する必要があります。コードは次のようになります。
<div style="position:aboslute; top:100px; left:200px; height:500px">
<div style="height:20px">Example 1</div>
<div style="height:2px">Example 2</div>
</div>
ソリューション?
relative
親に位置を与えabsolute
、子に位置を与えます。
<div style="position:aboslute; top:100px; left:200px; height:500px">
<div style="height:20px; position: absolute; bottom: 0;">Example 1</div>
<div style="height:2px; position: absolute; bottom: 0;">Example 2</div>
</div>
ここでフィドルをチェックしてください:http://jsfiddle.net/vLn32/