国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

如何讓子DIV在父DIV的低端

2024-07-11 07:46:10
字體:
來源:轉載
供稿:網友

本文通過使用CSS控制子DIV顯示在父DIV的低端,具體思路:

父div的位置設置成相對的,即“position: relative;”。而子div的位置設置成絕對的,并且下邊緣設為0,即“position: absolute; bottom: 0;”。

代碼:

<head>    <title>子div在父div中置底</title>    <style type="text/css">        .father { width: 500px; height: 600px; position: relative; background-color: AliceBlue; }        .child { width: 400px; height: 100px; position: absolute; bottom: 0; background-color: AntiqueWhite; }    </style></head><body>    <div class="father">        <div class="child">        </div>    </div></body></html>
 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 开远市| 临沭县| 怀宁县| 辽阳县| 广德县| 丹巴县| 综艺| 天全县| 射洪县| 西华县| 邯郸县| 新丰县| 孟连| 庆元县| 集贤县| 彭泽县| 永春县| 云梦县| 南岸区| 台中县| 双江| 黎平县| 耒阳市| 高州市| 海盐县| 阿拉善盟| 高尔夫| 丰顺县| 北流市| 博罗县| 许昌市| 孟州市| 靖江市| 永和县| 阳城县| 日喀则市| 津市市| 西贡区| 梅河口市| 德格县| 英吉沙县|