<view class="tab bg"> <scroll-view class="" scroll-x="true" style="width: 100%;white-space: nowrap; display: flex;overflow-x: auto;"> <view style="display: inline-block" bindtap="switchIndex" class="tab-list {{index === 1 ?'on':''}}">首页</view> <view wx:for="{{tab}}" wx:key="index" data-id="{{item.id}}" data-index="{{index}}" style="display: inline-block" bindtap="switchTab" class="tab-list {{tabIndex === index?'on':''}}"> {{item.nav_name}} </view> </scroll-view> </view>
代码一贴其实当测试小哥告诉你安卓tab不能滑的时候,你只需要加一个overflow-x: auto;哈哈哈
相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!
推荐阅读:
以上就是微信小程序开发中怎样实现Android环境下的横向滚动的详细内容,更多请关注php中文网其它相关文章!
微信是一款手机通信软件,支持通过手机网络发送语音短信、视频、图片和文字。微信可以单聊及群聊,还能根据地理位置找到附近的人,带给大家全新的移动沟通体验,有需要的小伙伴快来保存下载体验吧!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号