0
請幫我把左邊的圖像和右邊的圖像對齊。所以我有一個基本的頁面...兩個圖像,我希望他們斜對面對方。非常簡單,但我已經嘗試過的每一件事,只是使兩個圖像在右邊對齊....放置兩個圖像。一個右上角,另一個左下角
請幫我把左邊的圖像和右邊的圖像對齊。所以我有一個基本的頁面...兩個圖像,我希望他們斜對面對方。非常簡單,但我已經嘗試過的每一件事,只是使兩個圖像在右邊對齊....放置兩個圖像。一個右上角,另一個左下角
這裏有一個涉及絕對定位的解決方案。協調多個實體可能會非常棘手,但如果您需要精確的佈局,則它非常靈活。
<div style="position: relative; width: 300px; height: 300px;">
<div style="position: absolute; background-color: red; width: 100px; height: 100px; left: 0px; top: 0px;">Top Left</div>
<div style="position: absolute; background-color: blue; width: 100px; height: 100px; right: 0px; bottom: 0px;">Bottom Right</div>
</div>
OMG THANK YOU SO MUCH !!!! – 2011-03-01 22:05:45
非常感謝您 – 2011-03-01 22:06:39