.a{
width: 100px;
height: 300px;
background-color: #286090;
}
.a div{
width: 50px;
height: 50px;
background-color: aqua;
text-align: center;
}
<div class="a">
<div>文本居中对齐</div>
</div>
.a{
width: 100px;
height: 300px;
background-color: #286090;
}
.a div{
width: 50px;
height: 50px;
background-color: aqua;
text-align: center;
}
<div class="a">
<div>文本居中对齐</div>
</div>
转载于:https://www.cnblogs.com/quandong/p/7067268.html