→ kevinkung: 貼程式碼上來看會比較清楚 11/16 18:51
<div class="col-md-12">
<section cls="col-md-6">
<p>外層的section height = 0</p>
<p>但內層的p有高度</p>
</section>
</div>
※ 編輯: aa1235561 (140.124.249.101), 11/17/2016 10:56:57
→ xdraculax: 中間加個 .row 看看 11/17 19:49
→ xdraculax: div.col-sm-12 > div.row > section.col-sm-6 11/17 19:51
→ frostyjoan: .col-*都有float:left,要記得clear,可以像x大說的加 11/18 01:26
→ frostyjoan: 一層.row(bootstrap有在此class清浮動),或是自己 11/18 01:26
→ frostyjoan: 手動對div clear,或是div加上.clearfix(bootstrap清 11/18 01:26
→ frostyjoan: 浮動的class) 11/18 01:26
→ aa1235561: 各位大大可以了!加了row之後世界太平!!!! 11/18 22:13
→ frostyjoan: 建議你去看一下float,不然未來還是有可能遇到問題卻 11/19 09:46
→ frostyjoan: 怎樣都找不到 11/19 09:46
→ aa1235561: 我float都有做clear,加了.row就都沒事了! 11/19 16:10
→ frostyjoan: 會出現height: 0幾乎都是float沒清到,但奇怪,我認真 11/19 17:08
→ frostyjoan: 照你的圖解或程式碼試,都不會height: 0阿 11/19 17:08
→ aa1235561: 我使用的是chrome,會不會是我加了什麼外掛改變到了? 11/20 00:59