自己开发的程序scroll-y始终无效果,上网找了个例程新建项目写进去,还是无效果,scroll-x可用。
HTML代码如下:
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;} |
|---|
贴张图吧,研究了一晚上了,我尽力了,求指点。

网友回复:
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)移动互联网具影响力的盈利指导网站。定位于服务移动互联网创业者,移动盈利指导。我们的目标是让盈利目标清晰可见!降低门槛,让缺乏经验、资金有限的个人和团队获得经验和机会,提高热情,激发产品。


