先设置一个固定位置的大画布,然后设置此画布被所有参数均为垂直水平居中
然后再创建一个 view即可
.body{
width:100%;
height:100%;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
}
.a{
width:90%;
height:600rpx;
background-color: yellow;
}
先设置一个固定位置的大画布,然后设置此画布被所有参数均为垂直水平居中
然后再创建一个 view即可
.body{
width:100%;
height:100%;
position: absolute;
display: flex;
align-items: center;
justify-content: center;
}
.a{
width:90%;
height:600rpx;
background-color: yellow;
}