css样式
.tana {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 99;
}
.tana_content {
width: 70%;
height: 30%;
border-radius: 0.5rem;
background-color: white;
margin: auto;
}
.tanb {
width: 100%;
height: 100%;
position: relative;
display: flex;
justify-content: center;
}
效果图
布局代码
<div class="tana">
<div class="tanb">
<div class="tana_content">
<p class="tanb_p">恭喜你进入积分榜前十</p>
<p class="tanb_pa">领取前十奖励</p>
</div>
</div>
</div>