css sticky

2019-11-21  本文已影响0人  日不落000
          <div
             style={{
                    position: 'sticky',
                    top: 100,
                    width: 800,
                    background: 'rgba(255,0,0,0.1)',
                }}>
              (滚动div, 我会一直显示在某个位置 Sticky)
          </div>

参考:
https://codepen.io/ribuluo000/pen/OJLopvM

上一篇 下一篇

猜你喜欢

热点阅读