【问题标题】:Twitter Bootstrap sidebar on the right instead of the leftTwitter Bootstrap 侧边栏在右侧而不是左侧
【发布时间】:2012-02-04 22:14:27
【问题描述】:

Twitter Bootstrap 侧边栏的默认配置是左侧。我怎样才能把它移到右边?

更新: 下一个版本似乎可以实现:https://github.com/twitter/bootstrap/issues/333

【问题讨论】:

    标签: html css layout frameworks twitter-bootstrap


    【解决方案1】:

    只需将侧边栏的流程向右移动,如下所示:

    .container-fluid > .sidebar {
        position: absolute;
        right: 20px;
        top: 0;
        width: 220px;
    }
    
    .container-fluid > .content {
        margin-right: 240px;
    }
    

    编辑演示http://jsfiddle.net/andresilich/6vPqA/show/

    【讨论】:

      【解决方案2】:

      如果您使用的是 github 上显示的流体布局示例,这应该可以工作。

      .sidebar
      {
          left: auto;
          right: 20px;
      }
      

      【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-15
      相关资源
      最近更新 更多