遇到一个小问题, 记录一下
问题: 在微信小程序中使用 scroll-view 标签时, 用 height:cale(xx - xx) 设置高度无效, 在 page 中设置高度为百分百依旧无效
解决办法: 直接在最大的 view 标签中设置高度为百分百即可
- <view style="height:100%;">
- <!-- 视频列表 -->
- <scroll-view class="videoList" scroll-y>
- </scroll-view>
- </view>
- page {
- height: 100%;
- }
- .videoList {
- height: calc(100% - 480rpx);
- }
来源: http://www.bubuko.com/infodetail-3357579.html