【问题标题】:twitter bootstrap fluid layouttwitter bootstrap 流体布局
【发布时间】:2013-02-13 02:11:18
【问题描述】:

我想实现流畅的布局。此处显示为http://twitter.github.com/bootstrap/scaffolding.html#global

我做了什么: 添加 gem 'twitter-bootstrap-rails + bundle install

布局/应用程序布局

 <head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">

  </head>

<body>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<div class="container-fluid">
    <div class="row-fluid">
    <div class="span2">
     SIDEBAR
    </div>
    <div class="span10">
      <%= yield %>
    </div>
  </div>
</div>
</body>

没有任何改变。我忘记了什么?

【问题讨论】:

    标签: twitter-bootstrap-rails


    【解决方案1】:

    bootstrap-responsive.css 文件只是 bootstrap 的一部分。您需要的主要 css 文件称为 bootstrap.css

    尝试在标题中添加这行代码,看看是否有任何变化:

    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet">
    <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
    </head>
    

    其实是可以的,看看jsFiddle:

    http://jsfiddle.net/persianturtle/sEywB/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-30
      • 2013-10-15
      • 2013-09-07
      • 2012-02-03
      相关资源
      最近更新 更多