微信小程序滚动条下面的选中小样式要怎么做?
发布于 7 年前 作者 yangcui 9148 次浏览 来自 官方Issues
2 回复

来个代码片段呢

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

回到顶部