粘性布局组件,元素相对于窗口或指定容器的吸顶效果。
基本使用
html
<iui-sticky>
<view class="layout"> 基本用法 </view>
</iui-sticky><iui-sticky>
<view class="layout"> 基本用法 </view>
</iui-sticky>css
.layout {
background: #165dff;
color: white;
padding: 10px;
position: inherit;
font-size: 14px;
}.layout {
background: #165dff;
color: white;
padding: 10px;
position: inherit;
font-size: 14px;
}吸顶距离
html
<iui-sticky :offsetTop="50">
<view class="layout"> 顶部距离 </view>
</iui-sticky><iui-sticky :offsetTop="50">
<view class="layout"> 顶部距离 </view>
</iui-sticky>API
<Sticky>props
