css 文字水平垂直居中

https://www.cnblogs.com/moqiutao/p/4807792.html

#apDiv2 {
    position: absolute;
    width: 200px;
    height: 115px;
    line-height:115px;
    z-index: 1;
    left: 289px;
    top: 164px;
    background-color: #CCCCCC;
    text-align:center;
}

垂直居中line-height 在height后等于height的值

猜你喜欢

转载自blog.csdn.net/ozhy111/article/details/84556405