DIV 让数字水平垂直居中?
橱窗的光
橱窗的光 2017-02-27 09:26:12
0
2
1028
.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 학습자의 빠른 성장을 도와주세요!