对齐和'右拉'

时间:2016-09-29 18:37:37

标签: css twitter-bootstrap

当使用pull-right时,不知何故,右边的按钮不再居中(垂直)。 怎么能放在中间?

       <li >
            <a  type="button" class="btn btn-default btn-sm ">
            <span class="glyphicon glyphicon-minus" ></span>
            </a>

            <a  type="button" class="btn btn-default btn-sm pull-right">
              <span class="glyphicon glyphicon-pencil" ></span>
           </a>
       </li>

https://jsfiddle.net/1mawa84n/2/

1 个答案:

答案 0 :(得分:1)

删除line-height给予li

的填充

试试这个:

CSS:

 li {
    background: rgba(254, 255, 251, 0.91) none repeat scroll 0 0;
    border: 1px solid black;
    border-radius: 3px;
    display: block;
    /* line-height: 3;*/
    margin: 0 0 -1px;
    padding: 10px;
    max-width: 100%;
    vertical-align: middle;
}