【问题标题】:put a button in the middle of a panel vertically在面板中间垂直放置一个按钮
【发布时间】:2017-09-23 08:34:52
【问题描述】:

这是我的标题面板代码,我想在标题面板的右侧和中间垂直显示一个按钮,并在标题面板的中心显示一个文本 但是按钮显示在标题面板的顶部而不是中间。

  <div class="panel panel-info ">
            <div class="panel-heading text-center clearfix">
                <a class="btn pull-right" style="background-color:red"          href="createpages"><span class="glyphicon glyphicon-plus" ></span></a>
                <h5  style="color:white">create pages</h5>
  </div>

【问题讨论】:

    标签: twitter-bootstrap twitter-bootstrap-3


    【解决方案1】:

    阅读您的问题后,它可能会有所帮助,或者您可以创建一个小提琴链接以提高清晰度

     <div class="panel panel-info ">
       <button type="button" style="float:right">button</button>
       <h5 align="center">Text center</h5>
    </div>
    

    【讨论】:

    • 您只需更改我的代码的一部分,这不是我的问题,正如我提到的,我只想将按钮垂直放在面板中间,而不是水平放在面板中心。