Solve the invalid problem of setting height:100% for the outermost container of the uniapp page

Problem Description

The setting for the outermost container of the page is height:100%;invalid, and there is also a problem with the setting height:100vh;, so here you need to set the height of its parent element for him to inherit.

Solution

// 需要
uni-page-body,page {
    
    
	height:100%
}
.container {
    
    
// 光这样是无效的
	width:100%;
	height:100%;
}

Guess you like

Origin blog.csdn.net/kwroi/article/details/127999454