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. atom开始输入!然后按tab只有空格出现没有html格式出现2. javascript - react-router 4.0版本怎么实现以前onEnter的效果3. angular.js - 关于指令link 中的创建变量问题4. node.js - nodejs+express+vue5. 求解决方法:Parse error: syntax error, unexpected6. jquery - css3 scale 缩放图片问题7. vue.js - 项目提交到github上,怎么实现在线预览效果8. html - css部分position fixed web网页问题 纯css做的下拉9. 学html时,点“运行实例”点“提交”,右边的白框框没任何反应。10. python爬虫 - scrapy使用redis的时候,redis需要进行一些设置吗?

网公网安备