给子元素加一个 vertical-align: top; 我这边遇到跟你一样的问题,只在手机端有此问题,加上这个css样式就好了。你可以试一下
scroll-view横向滚动:客户端和开发工具显示不一样,客户端错位给文字设置了高度,在开发工具上展示正常。但是在iPhone手机上(用的iPhone6)出现纵向错位,并且错位的幅度和文字内容的多少有关。 开发者工具展示: [图片] iPhone6展示: [图片]
2018-07-10给scroll-view 加以下样式 width: 100%;white-space: nowrap; 子元素display:inline-block;可以实现横向滚动
Scroll-View 组件的scroll-x属性不起作用When using "scroll-y" property within the scroll-view component, the image shows as below: [图片] the code as below: [代码]<[代码][代码]scroll-view[代码] [代码]class[代码][代码]=[代码][代码]""[代码] [代码]scroll-y [代码][代码]style[代码][代码]=[代码][代码]"height:250px;"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]id[代码][代码]=[代码][代码]"green"[代码] [代码]class[代码][代码]=[代码][代码]"scroll-view-item_H bc_green"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]id[代码][代码]=[代码][代码]"red"[代码] [代码]class[代码][代码]=[代码][代码]"scroll-view-item_H bc_red"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]id[代码][代码]=[代码][代码]"yellow"[代码] [代码]class[代码][代码]=[代码][代码]"scroll-view-item_H bc_yellow"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]id[代码][代码]=[代码][代码]"blue"[代码] [代码]class[代码][代码]=[代码][代码]"scroll-view-item_H bc_blue"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码]</[代码][代码]scroll-view[代码][代码]>[代码] When using "scroll-x"property within the scroll-view component, the image shows as below (same result as above): [图片] the code as below: [代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"section section_gap"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"section__title"[代码][代码]>horizontal scroll</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]scroll-view[代码] [代码]class[代码][代码]=[代码][代码]"scroll-view_H"[代码] [代码]scroll-x [代码][代码]style[代码][代码]=[代码][代码]"width:100%;"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]id[代码][代码]=[代码][代码]"green"[代码] [代码]class[代码][代码]=[代码][代码]"scroll-view-item_H bc_green"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]id[代码][代码]=[代码][代码]"red"[代码] [代码]class[代码][代码]=[代码][代码]"scroll-view-item_H bc_red"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]id[代码][代码]=[代码][代码]"yellow"[代码] [代码]class[代码][代码]=[代码][代码]"scroll-view-item_H bc_yellow"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]id[代码][代码]=[代码][代码]"blue"[代码] [代码]class[代码][代码]=[代码][代码]"scroll-view-item_H bc_blue"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]scroll-view[代码][代码]>[代码][代码]</[代码][代码]view[代码][代码]>[代码] 有人可以帮助solve 这个问题吗?
2018-07-10