求解CSS浮動樣式_html/css
來源:懂視網
責編:小采
時間:2020-11-27 16:33:11
求解CSS浮動樣式_html/css
求解CSS浮動樣式_html/css_WEB-ITnose:怎么才能使得粉紅色的div模塊放在綠色的div模塊后面啊? 無標題文檔 #container{ width:600px; height:500px; background:gray; } #test1{ width:50px; height:50px; background:red;
導讀求解CSS浮動樣式_html/css_WEB-ITnose:怎么才能使得粉紅色的div模塊放在綠色的div模塊后面啊? 無標題文檔 #container{ width:600px; height:500px; background:gray; } #test1{ width:50px; height:50px; background:red;

怎么才能使得粉紅色的div模塊放在綠色的div模塊后面啊?
無標題文檔 回復討論(解決方案)
#test3{
width:50px;
height:50px;
background:green;
clear:left;
flaot:left;
}
修正 為 float:left;
#test3{width:50px;height:50px;background:green;clear:left;flaot:left;}
float寫錯了
新手的通病
可以添加一個class 方便調用:
.clear{clear:both;overflow:hidden;height:0px;line-height:0px;font-size:0px;}
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
求解CSS浮動樣式_html/css
求解CSS浮動樣式_html/css_WEB-ITnose:怎么才能使得粉紅色的div模塊放在綠色的div模塊后面啊? 無標題文檔 #container{ width:600px; height:500px; background:gray; } #test1{ width:50px; height:50px; background:red;