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. css3 - div中的div无法控制高度?我想控制右边几个蓝色div的高度2. jquery - Ajax请求,返回200状态码,但收到数据包为空值3. javascript - jquery事件绑定中的this指向问题4. eclipse - 使用velocity时报java.lang.NoClassDefFoundError,是否少了什么包?5. mysql - JAVA怎么实现一个DAO同时实现查询两个实体类的结果集6. mysql - jdbc的问题7. mysql - msql什么叫并发8. angular.js - angularjs 与requirejs集成9. mysql-配置 - MySQL错误,时不时自动挂掉,无法启动10. wordpress - Nginx中禁止访问txt,robots.txt文件例外,规则该怎么写?

网公网安备