首页 >> js开发 >> js微信小程序中的列表切换功能实例代码详解js大全
js微信小程序中的列表切换功能实例代码详解js大全
发布时间: 2021年1月13日 | 浏览:
| 分类:js开发
感觉这列表切换有点类似于轮播图,而且感觉这代码直接可以拿来用,稍微改一改样式什么的就OK了,列表切换也是用到的地方也很多wxml中的代码如下:
音乐推荐
播放器
播放列表
音乐推荐
播放器
播放列表
在js页面的data中wxss样式:
.tab{
display: flex;
}
.tab-item{
flex: 1;
font-size:10pt ;
text-align: center;
line-height: 72rpx;
border-bottom: 6rpx solid #eee;
}
.content{
flex: 1;
}
.content>swiper{
height: 100%;
}
.tab-item.active{
color: #c25b5b;
border-bottom-color:#c25b5b ;
}
.tab{
display: flex;
}
.tab-item{
flex: 1;
font-size:10pt ;
text-align: center;
line-height: 72rpx;
border-bottom: 6rpx solid #eee;
}
.content{
flex: 1;
}
.content>swiper{
height: 100%;
}
.tab-item.active{
color: #c25b5b;
border-bottom-color:#c25b5b ;
}想设置这里的样式可以再.tab-item里面可以根据自己的审美设置 ,类似于下面这样总结总结总结
.tab{
display: flex;
}
.tab-item{
flex: 1;
font-size:10pt ;
text-align: center;
line-height: 72rpx;
border-bottom: 6rpx solid #eee;
}
.content{
flex: 1;
}
.content>swiper{
height: 100%;
}
.tab-item.active{
color: #c25b5b;
border-bottom-color:#c25b5b ;
}
.tab{
display: flex;
}
.tab-item{
flex: 1;
font-size:10pt ;
text-align: center;
line-height: 72rpx;
border-bottom: 6rpx solid #eee;
}
.content{
flex: 1;
}
.content>swiper{
height: 100%;
}
.tab-item.active{
color: #c25b5b;
border-bottom-color:#c25b5b ;
}想设置这里的样式可以再.tab-item里面可以根据自己的审美设置 ,类似于下面这样总结总结总结