工作中经常要用到css实现水平垂直居中
<div class="out">
<div class="in">
<p>占位文字</p>
<a href="#">占位地址</a>
</div>
</div>
<style>
.out { width: 100%; height: 100vh; display:flex; align-items: center;justify-content: center; text-align:center; font-size:large;}
</style>
网友评论