其他分享
首页 > 其他分享> > uniapp scss实现滑块

uniapp scss实现滑块

作者:互联网

.box{
  position:relative;
  }
.glider{ position: absolute; bottom: 0rpx; left: 0; width: 50%; height: 6rpx; border-radius: 3rpx; display: flex; align-items: center; justify-content: center; view{ width: 50rpx; height: 6rpx; background-color: #4475FE; } }
<view class="box">
  <view class="tabItem" v-for="(item,index) in tabList" @click="chosen = index" :key="`a${index}`" >
    {{item.name}}
  </view>
  <view class="glider" :style="'transform:translateX('+100*chosen+'%) ;transition: 1s ease-out;'" >
    <view></view>
  </view>
</view>

 

标签:scss,uniapp,center,滑块,height,width,position,6rpx
来源: https://www.cnblogs.com/laremehpe/p/16168834.html