twitter-bootstrap 跨度在引导程序 3 中不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20640285/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 19:30:03  来源:igfitidea点击:

Span not working in bootstrap 3

twitter-bootstrap

提问by Alimon Karim

Span is not working in bootstrap v3.0.3.

Span 在 bootstrap v3.0.3 中不起作用。

 <div class="span4">    
        <div class="list-group">
        <a href="#" class="list-group-item active">Link</a>
        <a href="#" class="list-group-item">Link 1</a>
        <a href="#" class="list-group-item">Link 2</a>
        <a href="#" class="list-group-item">Link 3</a>
        <a href="#" class="list-group-item">Link 4</a>
        </div>
    </div>

回答by Ranveer

spanhas become redundant in Bootstrap 3. It has now been replaced by col-xx-#, where xxcan be lg, md, smor xsand #ranges from 1 to 12. Read it up here.

span已成为引导3.冗余现在已经取代了col-xx-#,在那里xx可以lgmdsmxs#从1到12.读取它的范围在这里

Here's how your code should look like:

您的代码应如下所示:

<div class="col-md-4">    
    <div class="list-group">
    <a href="#" class="list-group-item active">Link</a>
    <a href="#" class="list-group-item">Link 1</a>
    <a href="#" class="list-group-item">Link 2</a>
    <a href="#" class="list-group-item">Link 3</a>
    <a href="#" class="list-group-item">Link 4</a>
    </div>
</div>

Instead of md, you can use any of the above xxbased on requirement.

代替md,您可以xx根据需要使用上述任何一种。

回答by Chris

As Ranveer mentioned, Bootstrap 3 no longer uses span and instead you would use .col-xx-4 (with xx being the minimum viewport size for the sizing to take effect [xs, sm, md, lg]). Here is the link for the documentation for more information: http://getbootstrap.com/css/#grid

正如 Ranveer 所提到的,Bootstrap 3 不再使用跨度,而是您将使用 .col-xx-4(xx 是使尺寸生效的最小视口尺寸 [xs, sm, md, lg])。这是文档的链接以获取更多信息:http: //getbootstrap.com/css/#grid