css3方法:未知高度宽度居中
<style>
.tips_layer_wrap {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .7);
z-index: 10000;
}
.tips_layer_wrap .tips_layer {
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
padding: 46px 60px;
background: #fff;
position: absolute;
left: 50%;
top: 50%;
font-size: 20px;
color: #000;
border-radius: 10px;
}
</style>
<div class="tips_layer_wrap">
<div class="tips_layer">请填写完整信息</div>
</div>