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 - 我的myeclipse一直连显示数据库连接失败,不知道为什么2. angular.js - angularjs 怎么封装 upload 上传3. 网页爬虫 - Python:爬虫的中文编码问题?4. javascript - H5页面怎么查看console信息?5. javascript - vue生成一维码?求助!!!!!急6. javascript - 关于Js中 this的一道题7. javascript - 修改表单多选项时和后台同事配合的问题。8. ubuntu 远程管理KVM设置问题9. docker绑定了nginx端口 外部访问不到10. dockerfile - 我用docker build的时候出现下边问题 麻烦帮我看一下
