css - 对齐和 'right-pull'

标签 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/

最佳答案

移除 line-heightli 填充

试试这个:

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;
}

关于css - 对齐和 'right-pull',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39777668/

相关文章:

javascript - 选择框高度在 chrome 中不起作用

css - 在具有可滚动中心 div 的智能手机浏览器上垂直排列 div

html - 带有 float 中间元素的四个等长框

ruby-on-rails-3 - Bootstrap Assets 应该只在管理员中工作 - Rails

jquery - 使用 Bootstrap 只允许在表单文本框中使用字母数字字符?

javascript - 在 jsfiddle 中旋转 Canvas

html - CSS:找到页面中大空白的原因

html - 使 Bootstrap 输入字段保持一致

html - Bootstrap 页脚在移动设备上链接全宽和两列

php - Bootstrap jquery twitter 本地 Bootstrap