<div class="container">
  <header class="header">Header</header>
  <main class="main">
    <article class="item content">Content</article>
    <nav class="item secondly">Secondly</nav>
    <aside class="item aside">Aside</aside>
  </main>
  <footer class="footer">Footer</footer>
</div>
body {
  margin: 0;
  background: #e9eef3;
}

.container {
  display: flex;
  height: 100vh;
  flex-direction: column;
  background: #fff;
}

.main {
  flex: 1;
  display: flex;
  margin: 16px 0;
}

.content {
  flex: 1;
  background: #dddd88;
  margin: 0 16px;
  order: 2;
}

.secondly {
  flex: 0 0 240px;
  order: 1;
  background: #ccccff;
}

.aside {
  flex: 0 0 240px;
  order: 3;
  background: #ccccff;
}

.header,
.footer {
  height: 60px;
  background: #ffeebb;
}

/* 辅助性样式,仅仅用于文字居中,可有可无的 */
.header,
.footer,
.content,
.secondly,
.aside {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 窄到已不足以支持三栏 */
@media all and (max-width: 640px) {
  .main {
    flex-direction: column;
    margin: 10px 0;
  }

  .item {
    order: 0;
    margin: 0 10px;
  }

  .secondly,
  .aside {
    margin-top: 10px;
    height: 50px;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.