<section>
  <h1>...</h1>
  <h1>...</h1>
  <h1>...</h1>
  <p class="sticky">这是sticky区域</p>
  <h1>...</h1>
  <h1>...</h1>
  <h1>...</h1>
  <h1>...</h1>
  <h1>...</h1>
  <h1>...</h1>
</section>
<section class="another">
  另一个区域啊
</section>
.sticky{
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}
.another{
  height: 800px;
  background: #009ff0;
  color: #fff;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.