自己开发的程序scroll-y始终无效果,上网找了个例程新建项目写进去,还是无效果,scroll-x可用。

HTML代码如下:

垂直滚动 line1 line2 line3 line4 line5 line6 line7 line8 line9 line10 line11 line12水平滚动 1111111111111111111111111111111111111111111111111111111111 CopyRight:All Right Reserved 作者:FutureJet 公众号(仅供学习交流):TITF

CSS代码如下:

.title{ height: 30px; text-align: center;}.scroll_view_vertical{ height: 50%; margin-bottom: 20px; background-color: ghostwhite;}.scroll_view_horizotal{ height: 50px; background-color: whitesmoke;}.item{ height: 50px;}.copyright{ color: white; padding: 5px; margin-right: 3px; margin-left: 3px; text-align: center; background-color: darkblue;}.copyright_item{ margin-top: 5px;}.img{ width: 200px; height: 200px; margin-bottom: 5px;}

贴张图吧,研究了一晚上了,我尽力了,求指点。

scroll-view scroll-y 无效 求指点

网友回复:

R***:

把 height:50% 改成 height:50vh 试试?

让***:

这个比较坑,我在wxml里面设置height有用,但是wcss里面没用

皓***:

50 vh 有效,搞定了,感谢!

S***:

高度不要定为50%,scroll-view应该有个固定的高度,你的问题就出在这里

G***:

把scroll-view的 height:设为固定***rpx试一下

请***:

scroll-y =‘true’

请***:

scroll-y=“true”

爱盈利(aiyingli.com)移动互联网具影响力的盈利指导网站。定位于服务移动互联网创业者,移动盈利指导。我们的目标是让盈利目标清晰可见!降低门槛,让缺乏经验、资金有限的个人和团队获得经验和机会,提高热情,激发产品。