//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 无消息时背景完全居中
猜你喜欢
转载自blog.csdn.net/qq_27064559/article/details/82217162
今日推荐
周排行