0
点赞
收藏
分享

微信扫一扫

div不定宽高,文字垂直居中

云岭逸人 2023-03-06 阅读 80


div不定宽高,文字垂直居中_css3

 

<div style="width:100%; height:100%; background:rgba(0,0,0,0.7); display:flex; justify-content:center; align-items:center;">
<div style="width:50%; height:50%; background:pink;color:#000000;text-align:center;align-items:center; justify-content:center; display: -webkit-flex;">
<div>
<div>第一行</div>
<div>第二行</div>
<div>第三行</div>
</div>
</div>
</div>

举报

相关推荐

0 条评论