main
  h1 ↓下にスクロールしてください↓
footer
  h1 最下部までスクロールするとフッターが現れる
View Compiled
body {
  margin: 0;
  padding: 0;
  main {
    position: relative;
    z-index: 2;
    margin-bottom: 240px;
    padding: 8px;
    width: 100vw;
    height: 120vh;
    background-color: #fff;
    h1 {
      margin: 0;
    }
  }
  footer {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 240px;
    color: #eee;
    background-color: #43484b;
    h1 {
      margin: 0;
    }
  }
}
View Compiled
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.