我有一段特定的HTML段,我試圖對齊到它的父項的底部。然而,父母的身高是未知的。絕對定位將無法工作,因爲高度是未知的(相信我,我已經嘗試了絕對子元素和底部廣泛記錄的相對位置:0)。有問題的內容是在一個邊欄內,如下圖所示:將內容與CSS的底部對齊使用CSS
------------------
| stuff |con|
| stuff |ten|
| stuff | |
| | |
| |bot| <--- This is what I want to align to the bottom
------------------
任何巧妙的解決方案呢?
編輯:
在這種情況下絕對位置不起作用。
------------------
| stuff |con|
| stuff |ten|
| stuff | |
| | |
| |bot|
-------------|bot|
|bot|
|bot| <--- Unintended trailing...
'位置:絕對;底部:0;'? – timolawl
[將元素與flexbox對齊](http://stackoverflow.com/q/31000885/1529630) – Oriol
@timolawl,不幸的是絕對不會在這裏工作,因爲高度沒有指定。 –