<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <link rel="stylesheet" href="./css/index.css"> </head> <body> <header></header> <div class="body"> <nav></nav> <section></section> <aside></aside> </div> <footer></footer> </body> </html>
*{ margin: 0; padding: 0; list-style: none; } header, footer { height: 50px; background-color: aquamarine; } header { flex: 0 0 60px; } footer { flex: 0 0 40px; } html { height: 100%; } body { height: 100%; display: flex; flex-direction: column; } .body { flex: 1; display: flex; } nav, aside { flex: 0 0 150px; } section { flex: 1; background-color: blueviolet; }
原文地址:https://www.cnblogs.com/tujw/p/11107466.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。