css - 前端flex布局嵌套內(nèi)層的布局不起作用?
問題描述
<!DOCTYPE html>
<html lang='en'> <head><meta charset='UTF-8'><title>Document</title><style type='text/css' media='screen'> .box{ width: 200px; display: flex; height: 200px; background: skyblue; flex-direction: column;} .first{ height:30px; width: 200px; background: red;} .second{ flex-grow: 1; background: pink; style:flex;} .third{width:100%; height: 30px; background: yellow;} .fourth{ width: 100%; flex-grow: 1; background: gray }</style> </head> <body><p class='box'> <p class='first'></p> <p class='second'><p class='third'></p><p class='fourth'> </p> </p></p> </body></html>這樣做class為fourth的標(biāo)簽的高度就無法自適應(yīng)了?該如何解決這個問題?
問題解答
回答1:修改一下入下圖的地方

謝謝,我怎么說我項(xiàng)目中的代碼不起作用,原來是多個分號。。。找的我好慘
相關(guān)文章:
1. boot2docker無法啟動2. node.js - antdesign怎么集合react-redux對input控件進(jìn)行初始化賦值3. 關(guān)于docker下的nginx壓力測試4. MYSQL中如何把SELECT A AS B中的B作為WHERE篩選條件5. mysql - InnoDB中的鎖6. MySQL客戶端吃掉了SQL注解?7. mysql - 對同一個表同時更新2條記錄,但更新不同字段,會不會造成數(shù)據(jù)丟失?8. node.js mysql Cannot find module "net" 和 "tls"和"fs" 的問題9. mysql 一條語句多種count如何寫10. 數(shù)據(jù)庫 - Mysql的存儲過程真的是個坑!求助下面的存儲過程哪里錯啦,實(shí)在是找不到哪里的問題了。

網(wǎng)公網(wǎng)安備