css - 前端flex布局嵌套内层的布局不起作用?
高洛峰
高洛峰 2017-04-17 14:53:27
0
2
881

<!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的标签的高度就无法自适应了?该如何解决这个问题?
高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(2)
刘奇

Modify the place in the picture below

阿神

Thanks, how can I say that the code in my project doesn't work, it turned out to be multiple semicolons. . . I’m so miserable looking for it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template