跨越整排

时间:2015-01-18 19:06:42

标签: jquery html css twitter-bootstrap

我试图让这个布局example正常工作(如果你给结果选项卡留出更多空间,你可以看到跨距如何响应)。

我有相同的代码,但由于某种原因,每个跨度占用自己的行。

image of spans

这是我的代码:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Wooo</title>
        <link rel="stylesheet" id="font-awesome-css" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" type="text/css" media="screen">
        <link rel="stylesheet" href="css/bootstrap.css">
        <link rel="stylesheet" href="css/site.css">
        <!DOCTYPE html>
    </head>

    <body>
        <div class="row-fluid">
            <div class="span4">
                <div class="well">1<br/><br/><br/><br/><br/></div>
            </div>

            <div class="span8">
                <div class="row-fluid">
                    <div class="span6"><div class="well">2</div></div>
                    <div class="span6"><div class="well">3</div></div>
                </div>
                <div class="row-fluid">
                    <div class="span6"><div class="well">4</div></div>
                    <div class="span6"><div class="well">5</div></div>
                </div>
            </div>
        </div>

        <div class="row-fluid">
            <div class="span12">

                <div class="row-fluid">
                    <div class="span4"><div class="well">2</div></div>
                    <div class="span4"><div class="well">3</div></div>
                    <div class="span4"><div class="well">4</div></div>
                </div>  
           </div>
        </div>


    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
    <script src="js/bootstrap.js" type="text/javascript"></script>
    <script src="js/bootstrap.js"></script>
    <script type="text/javascript"></script>
    <script src="js/scrolling.js"></script>
    </body>
</html> 

1 个答案:

答案 0 :(得分:1)

根据帖子here

  

在Bootstrap 3中,.span *类已被删除,并被替换   结合.col- *类:.col-xs- ,.col-sm - ,.col-md- ,   and.col-LG -

我已将代码段修改为以下内容,似乎可以解决这个问题:

   <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">

    <div class="container-fluid">
        <div class="row">
            <div class="col-md-4">
                <div class="well">1
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                    <br/>
                </div>
            </div>
            <div class="col-md-8">
                <div class="row">
                    <div class="col-md-6">
                        <div class="well">2</div>
                    </div>
                    <div class="col-md-6">
                        <div class="well">3</div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <div class="well">4</div>
                    </div>
                    <div class="col-md-6">
                        <div class="well">5</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-4">
                <div class="well">6</div>
            </div>
            <div class="col-md-4">
                <div class="well">6</div>
            </div>
            <div class="col-md-4">
                <div class="well">6</div>
            </div>
        </div>
    </div>