我们可以使用Bootstrap3在css中更改容器的宽度

时间:2015-06-13 13:39:25

标签: twitter-bootstrap-3 width containers

如何在bootstrap3中更改容器的宽度。我希望浏览器中心的内容(浏览器宽度的70%)。

               <p>

                 Use Bootply to design, prototype, or test the Bootstrap framework. Find examples, share code and rapidly build interfaces for Bootstrap. 
                 Use Bootply to design, prototype, or test the Bootstrap framework. Find examples, share code and rapidly build interfaces for Bootstrap. 
              </p>
               <p>

Use Bootply to design, prototype, or test the Bootstrap framework. Find examples, share code and rapidly build interfaces for Bootstrap. 
              Use Bootply to design, prototype, or test the Bootstrap framework. Find examples, share code and rapidly build interfaces for Bootstrap. 


            </p><p>
            Positive Energy By Nature <br>
            Sun is always there for us
            </p>

            <p>
                Use Bootply to design, prototype, or test the Bootstrap framework. Find examples, share code and rapidly build interfaces for Bootstrap. 
            </p>
            </div>

Please check my code

2 个答案:

答案 0 :(得分:0)

您将p标签包围在

<div class="container">

然后在你的css文件中声明如下:

.container {
  max-width: 70%;
}

我希望这会对你有所帮助:)。

但不是70%而是最好准确地声明max-width ...就像max-width: 1100px;

一样

答案 1 :(得分:-1)

您可以创建新样式。将其命名为styl.css。然后,搜索bootstrap3文件夹。你会发现bootstrap.min.css。输入Ctrl+F并搜索“容器”类。修改它。

例如,

.container{
    width:70;
}

我希望这会对你有帮助。