作成日:2018-01-17, 更新日:2018-01-17
基本
・子要素に「position:sticky;」と位置を指定
<style> .childWrap { position: -webkit-sticky; position: sticky; top: 0; } </style> <div> <div class="childWrap"> 〇〇〇 </div> </div>
※top、bottomだけじゃなく、leftやrightもOK。
作成日:2018-01-17, 更新日:2018-01-17
・子要素に「position:sticky;」と位置を指定
<style> .childWrap { position: -webkit-sticky; position: sticky; top: 0; } </style> <div> <div class="childWrap"> 〇〇〇 </div> </div>
※top、bottomだけじゃなく、leftやrightもOK。