DIV 让数字水平垂直居中?
橱窗的光
橱窗的光 2017-02-27 09:26:12
0
2
1031
.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学习者快速成长!