DIV 让数字水平垂直居中?
橱窗的光
橱窗的光 2017-02-27 09:26:12
0
2
1030
.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 学習者の迅速な成長を支援します!