<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Title</title>
    <style>

        .box { display: flex; min-height: 100vh; flex-direction: column; }
        .box-con { flex: 1; }
        header{
            height:100px;
            background:red;
        }
        footer {
            height:100px;
            background:cyan;
        }
    </style>
</head>
<body class="box">
    <header></header>
    <main class="box-con"></main>
    <footer></footer>
</body>
</html>

 

相关文章:

  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2022-03-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-07
  • 2021-04-16
  • 2021-10-28
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案