用uniapp写小程序的可移动侧边栏

代码:



	
		
		
	


//获取屏幕的可用高度,
uni.getSystemInfo({
			success: function(res) {
				that.res = res;
				console.log(res.windowHeight);
			}
		});

我这儿为了突出移动区域使用了背景,效果图:
用uniapp写小程序的可移动侧边栏_第1张图片
H5页面position会无视顶部栏,所以top设置成顶部栏的高度,代码:



	
		
	

你可能感兴趣的:(小程序,uni-app)