怎么让两个header都吸顶呢?
<template>
<view style="height: 1000rpx;">
<waterfall :column-count="1" column-width="auto">
<cell>
<view style="background-color: #007AFF;height: 200rpx;">waterfall</view>
</cell>
<header class="sticky">
<view class="v">
<text>header1</text>
</view>
</header>
<header class="sticky">
<view class="v">
<text>header2</text>
</view>
</header>
<cell>
<view style="background-color: #007AFF;height: 1750rpx;">waterfall</view>
</cell>
</waterfall>
</view>
</template>
<style>
.sticky {
position: sticky;
top: 0rpx;
}
.v{
height: 100rpx;
width: 300rpx;
margin: 50rpx;
background-color: #4CD964;
}
</style>
qlingYes (作者)
这是nvue它没有这个z-index
2022-01-29 20:53