wxm文件
<view class="demo">
我是demo
</view>
wxss文件
.demo {
position:fixed;
margin:auto;
left:0;
right:0;
top:0;
bottom:0;
width:200px;
height:150px;
}
效果
wxm文件
<view class="demo">
我是demo
</view>
wxss文件
.demo {
position:fixed;
margin:auto;
left:0;
right:0;
top:0;
bottom:0;
width:200px;
height:150px;
}
效果