swiper内部的z-index无论多大,都无法覆盖外部的标签。蓝色为1,其他都为100。
蓝色和tabbar是有效的。
wxml
<swiper style="height: {{clientHeight?clientHeight+'px':'auto'}}">
<swiper-item>
<view class="red">红色view>
swiper-item>
<swiper-item>
<view class="green">绿色view>
swiper-item>
<view class="yellow">黄色view>
swiper>
<view class="blue">蓝色view>
<cpn-tabBar titles="{{titles}}" bind:titleClick="handleTitleClick"/>
css
.red {
width: 100%;
height: 500rpx;
background-color: red;
position: fixed;
bottom: 0;
left: 0;
z-index: 100;
}
.green {
width: 200rpx;
height: 400rpx;
background-color: green;
position: fixed;
bottom: 0;
left: 0;
z-index: 100;
}
.yellow {
width: 100%;
height: 300rpx;
background-color: yellow;
position: fixed;
bottom: 0;
left: 0;
z-index: 100;
}
.blue {
width: 100rpx;
height: 300rpx;
background-color: blue;
position: fixed;
bottom: 0;
right: 0;
z-index: 1;
}
弄一个 [ 能复现问题的简单的 ] 代码片段
https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html