css - 前端flex布局嵌套内层的布局不起作用?
问题描述
<!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的标签的高度就无法自适应了?该如何解决这个问题?
问题解答
回答1:修改一下入下图的地方

谢谢,我怎么说我项目中的代码不起作用,原来是多个分号。。。找的我好惨
相关文章:
1. Mysql取下一条记录2. 求助一个Android控件名称3. javascript 如何下载一个excel文件 ?4. notepad+编写的html,打开就是这样了。为什么,大神们5. Chrome-org.openqa.selenium.WebDriverException:未知错误:无法在driver.manage()window()maximize();处获得自动化扩展6. mysql federated引擎无法开启7. python 如何打印bytes以16进制输出8. javascript - vue-resource 如何二次封装9. sublime text 3不支持python的input吗10. python对8000行csv添加列

网公网安备