在BootstrapCSS的页面下角放置一个面板

时间:2016-04-20 18:56:52

标签: css twitter-bootstrap-3 less

我正在使用BootstrapCSS 3来制作地图应用程序。我创建了一个面板如下:

<div class="panel panel-default">
          <div class="panel-heading">
            <h4 class="panel-title">
              <a data-toggle="collapse" href="#legendpane">
                <i class="fa fa-tasks"></i>
                Legend
              </a>

            </h4>
          </div>
          <div id="legendpane" class="panel-collapse collapse">
            <div id = "listedAttributes" class="panel-body list-group" style="max-height: 200px; overflow-y:scroll;">
                <img src="static/img/legend.png" alt="legend" width="185" height="147">
            </div>
          </div>
  </div>

我想要的是将此面板放在页面按钮上。当页面被自动调整以保留在那里(在右下角)。我尝试使用margin-top:x%或maging-buttom但它没有给出我想要的结果。 它没有回应。

enter image description here

1 个答案:

答案 0 :(得分:1)

尝试添加

bottom: 10px;
position: fixed;
float: left;

到你的css中的<div class="panel-heading">