在bootsrap面板右中左侧的arrrange文本响应

时间:2016-09-29 15:10:41

标签: twitter-bootstrap

我正在创建自举面板,问题在于将文本对齐,中间的用户图标和左边的剩余文件。

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
   <div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading clearfix">
            <h4 class="panel-title pull-left" style="padding-top: 7.5px;">Panel header</h4>
              
                              
                  <div class="pull-center">
                        <button class="btn btn-primary"><i class="glyphicon glyphicon-user"></i></button>
                    </div>
                   
                  <div class="pull-right">
                        <button class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
                        <button class="btn btn-primary"><i class="glyphicon glyphicon-wrench"></i></button>
                    </div>
              
        </div>
        <div class="panel-body">
            Panel content
        </div>
    </div>
</div>

1 个答案:

答案 0 :(得分:0)

像这样使用像text-center这样的整个标题..

<div class="panel panel-primary">
        <div class="panel-heading text-center">
            <h4 class="panel-title pull-left" style="padding-top: 7.5px;">Panel header</h4>
             <button class="btn btn-primary"><i class="glyphicon glyphicon-user"></i></button>
             <div class="pull-right">
                   <button class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
                   <button class="btn btn-primary"><i class="glyphicon glyphicon-wrench"></i></button>
             </div>
        </div>
        <div class="panel-body">
            Panel content
        </div>
    </div>

http://www.codeply.com/go/P2m3GmIKNQ