微信小程序滚动条下面的选中小样式要怎么做?

发布于 9 年前作者 yangcui9341 次浏览最后编辑 9 年前来自 issues
2 回复
duangang
duangang1 楼6 年前

来个代码片段呢

jfeng
jfeng2 楼6 年前

wsml:

<scroll-view class=“nav” scroll-x={{true}}>

<view bindtap=activeNav data-index = {{index}} class=“nav_item {{index === currentIndexNav?active:‘’}} wx:for={{navList}} wx:key={{index}}>

{{item}}

</view>

</scroll-view>

wxss:

.nav {

white-space: nowrap;

}

.nav_item {

padding: 0 35rpx;

font-size: 30rpx;

display: inline-block;

}

.nav_item.active{

border-bottom : 6rpx solid #65C2E5;

}

我只能在它的下面一整块加一个border-bottom