0
A
回答
1
最簡單的方法是將所有三個div(.recentEventsDetail,.recentEventsLowerLeftElement,.recentEventsLowerRightElement)與position: relative;
包裝在一個包裝div中。然後,您可以製作較低的div div position: absolute;
並按此方式設置展示位置。例如:
<style type="text/css">
.reventEventsWrapper {position: relative;}
.recentEventsLowerLeftElement {position: absolute; bottom: 0px; left: 0px;}
.recentEventsLowerRightElement {position: absolute; bottom: 0px; right: 0px;}
</style>
<div class="reventEventsWrapper">
<div class="recentEventsDetail"></div>
<div class="recentEventsLowerLeftElement"></div>
<div class="recentEventsLowerRightElement"></div>
</div>
使用在包裝的相對位置使得絕對定位的兒童使用div的原點來計算位置。這裏唯一的問題是你可能有重疊。您也可能想要添加填充底部到您的包裝等於左側和右側div的高度。這確保它們從不重疊細節div。
0
您目前對於.recentEventsLowerLeftElement和.recentEventsLowerRightElement有哪些CSS?
要確保它們被清除到下一行,我會做類似如下:
<div class="recentEventsLowerElement">
<div class="recentEventsLowerLeftElement">
</div>
<div class="recentEventsLowerRightElement">
</div>
</div><!-- end .recentEventsLowerElement -->
.recentEventsLowerElement {明確:兩者; }
.recentEventsLowerElement .recentEventsLowerLeftElement {0} {0} {0} float:left; }
.recentEventsLowerELement .recentEventsLowerRightElement {float:right; }
相關問題
- 1. 偏斜的CSS - 保留在右上角和左下角的元素
- 2. 在右下角的svg元素上定位圖像
- 3. 左上角和右上角的按鈕
- 4. CSS如何定位圖像右下角
- 5. 如何指定視頻視圖的位置? (左上角,右上角,左下角等)
- 6. 如何爲UIView的左下角,右下角和左上角設置cornerRadius?
- 7. Cocos2D右下角定位點
- 8. 鏡像從左下角到右上角對角線圖片
- 9. 如何在android的左上角和右下角左右對齊按鈕?
- 10. 設置地圖的左上角和右下角座標
- 11. CSS - 表格右上角的位置div
- 12. Excel 2003,如何獲取範圍的左上角和右下角?
- 13. javascript懸停圖像並顯示左上角到右下角
- 14. 如何將導航元素定位到右上角
- 15. Javafx Labeled labelPaddingProperty - 在左上角或右上角添加三角形
- 16. 對齊水印與PHP左上角而不是右下角
- 17. 如何在左下角到右上角反射陣列?
- 18. Html選擇元素 - 如何重疊選擇元素左上角與選擇元素左上角
- 19. 表格元素左上角的標記
- 20. Popupwindow:ShowAsDropDown作爲右上角而不是左下角?
- 21. 保持徽標左上角和中心的UI元素的CSS
- 22. 在div的左下角和右下角對齊兩個圖像
- 23. CSS /菜單:如何定位元素右下方/元素旁邊
- 24. CSS transparant右上角三角形邊框
- 25. jQuery .CSS不會將元素放置在右下角!
- 26. 邊框左上角和右半徑不能在我的div元素上工作
- 27. 定位圖像右上角的圖像
- 28. 左右角的圓角不正確
- 29. 如何將圖例的右上角定位到matplotlib中Axes的右上角?
- 30. 無法在Wpf畫布上從右下角到左上角繪製矩形