DIV 让数字水平垂直居中?
橱窗的光
橱窗的光 2017-02-27 09:26:12
0
2
1029
.unsolve{
    position: absolute;
    right: 10px;
    top:50%;
    transform: translate(0,-50%);
    z-index: 1;
    font-size: 13px;
    background-color: red;
    border-radius: 50%;
    color:#fff;
    width: 15px;
    height: 15px;
    padding: 5px;
    text-align: center;
}

    <div class="unsolve">12</div>

    这样设定的时候,数字都会中间偏下,沒办法完全居中。请问该怎么样让他完全水平垂直居中?

橱窗的光
橱窗的光

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!