scroll-view 中设置scroll-x 安卓下显示不全
<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会被截掉后面一部分。求解
