css - 前端flex布局嵌套內(nèi)層的布局不起作用?
問(wèn)題描述
<!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)簽的高度就無(wú)法自適應(yīng)了?該如何解決這個(gè)問(wèn)題?
問(wèn)題解答
回答1:修改一下入下圖的地方

謝謝,我怎么說(shuō)我項(xiàng)目中的代碼不起作用,原來(lái)是多個(gè)分號(hào)。。。找的我好慘
相關(guān)文章:
1. docker 17.03 怎么配置 registry mirror ?2. javascript - immutable配合react提升性能?3. 網(wǎng)頁(yè)爬蟲 - 如何使用使用java抓取信息并制作一個(gè)排名系統(tǒng)?4. DADB.class.php文件的代碼怎么寫5. macos - 如何徹底刪除mac自帶的apache和php6. javascript - sublime快鍵鍵問(wèn)題7. 如何設(shè)置一個(gè)無(wú)限循環(huán)并打破它。(Java線程)8. python小白 自學(xué)看書遇到看不懂的地方9. php對(duì)mysql提取數(shù)據(jù)那種速度更快10. shell - mysql更新錯(cuò)誤

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