html52.com
我爱小程序-开发者交流社区

scroll-view 中设置scroll-x 安卓下显示不全

问题模块
API和组件
<scroll-view class='menu'  scroll-x="true" bindscroll="scroll">
   <view class='{{currentMenuIndex==index?"menu_item selected_menu":"menu_item"}}'
   wx:key="{{index}}"
   bindtap='onPressMemu'
   wx:for='{{menus}}'
   data-index="{{index}}">
   {{item}}
   </view>
 </scroll-view>



样式:

.menu {
  margin-top: 1rem;
  width: 100%;
  height: 4rem;
  line-height: 2rem;
  white-space: nowrap;
  display: flex;
}
  
.menu_item {
  display: inline-block;
  width: 10%;
  height: 2rem;
  margin: 0 .3rem;
  white-space: nowrap;
  text-align: center;
}


这个宽度只能用百分比吗?ios下横向是会显示全的 但android会被截掉后面一部分。求解

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付