container-fluid bg-3 bootstrap类有什么作用?

时间:2018-02-20 16:25:54

标签: twitter-bootstrap-3

  

在哪里找我?

  

Lorem ipsum ..

<div class="container-fluid bg-3 text-center"> <h3>Where To Find Me?</h3> <p>Lorem ipsum..</p> </div>

2 个答案:

答案 0 :(得分:0)

Bootstrap 3读取:

  

使用.container-fluid作为整个宽度的容器,跨越整个容器   视口的宽度。

.container-fluid 的另一个对应部分是 .container 。 Bootstrap 3 doc说:

  

使用.container作为响应式固定宽度容器。

表示 .container 是响应式的,但有间隔。 Bootstrap为每个媒体断点(xs,sm,md,lg)应用固定的CSS width样式。 .container-fluid 展开以填充可用宽度(使用%宽度)。

例如,假设您的浏览器窗口宽度为1000px。因为它大于992px的最小宽度,所以.container元素的宽度为970px。然后慢慢扩大浏览器窗口。你的.container的宽度不会改变,直到你达到1200px,它将跳到1170px宽,并保持任何更大的浏览器宽度。

另一方面,您的.container-fluid元素会不断调整大小,因为您对浏览器宽度进行了最小的更改。

详情请咨询here

答案 1 :(得分:-1)

您可以在HTML元素&#34; col-lg-3&#34;下定义此代码。对于bg-3 bootstrap,此代码也可以使用bootstrap 4和bootstrap3。