//html
<div>
<img class="noImgView" src="../assets/noMessage.png" />
<div class="nomedication">暂时没有收到消息哦!</div>
</div>
//css
.noImgView{
position: absolute;
top: 50%;
left: 50%;
width: 130px;
height: 130px;
margin-left:-65px;
margin-top: -100px;
}
.nomedication{
position: absolute;
top: 50%;
left: 50%;
margin-top: 50px;
margin-left:-60px;
color: #b2b2b2;
}
css 无消息时背景完全居中
最新推荐文章于 2023-11-22 14:48:11 发布