使用微信小程序实现左右滑动功能,自定义顶部图案,点击文字滑动和手势触屏滑动,功能简单,具体实现代码如下所示:
1、wxss代码:
/* 步骤条 */
.tab-box {
display: flex;
flex-direction: row;
position: fixed;
left: 0;
right: 0;
top: 0;
z-index: 999;
background-color: #EEEEEE;
padding: 15rpx 20rpx;
}
.radius-a {
width: 34%;
border-radius: 5rpx 0 0 5rpx;
}
.width-2{
width: 28%;
}
.radius-b {
width: 28%;
border-radius: 0 5rpx 5rpx 0;
}
.rule-a {
height: 80rpx;
background-color: #44ADFB;
color: white;
line-height: 80rpx;
text-align: center;
font-size: 32rpx;
font-weight: bold;
}
.rule-b {
w