【问题标题】:Place a panel on the lower corner of page in BootstrapCSS在 Bootstrap CSS 页面的下角放置一个面板
【发布时间】:2016-08-13 15:51:19
【问题描述】:

我正在使用 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 但它没有给出我想要的结果。 它没有响应。

【问题讨论】:

    标签: css twitter-bootstrap-3 less


    【解决方案1】:

    尝试添加

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

    到您的 CSS 中的 &lt;div class="panel-heading"&gt;

    【讨论】:

    • 也许位置:固定和浮动:左?
    • 谢谢!如果我将它放在您建议的 div 的父级中,这非常有用:
      问题在于由于某种原因,图例的宽度会自行改变。我可以在样式中添加“宽度”值。
    • 如果你编辑你的答案,我会接受它是正确的。谢谢。
    猜你喜欢
    相关资源
    最近更新 更多
    热门标签