行Bootstrap响应

时间:2017-02-06 14:14:35

标签: twitter-bootstrap twitter-bootstrap-3

这是一个简单的引导代码

 <div class="row">
        <div class="col-sm-8">

            three

        </div>

        <div class="col-sm-4">

            four

        </div>

</div>

Sub ItemName()

Dim http As New MSXML2.XMLHTTP60, html As New HTMLDocument
Dim topics As Object, topic As Object, posts As Object, post As Object, ele As Object
Dim x As Long

x = 2

http.Open "GET", "http://www.bjs.com/tv--electronics.category.3000000000000144985.2002193", False
http.send
html.body.innerHTML = http.responseText

Set topics = html.getElementsByClassName("categories")

For Each topic In topics
    For Each posts In topic.getElementsByTagName("li")
        For Each post In posts.getElementsByTagName("a")
            Set ele = post.getElementsByTagName("h4")(0)
            Cells(x, 1) = ele.innerText
            x = x + 1
        Next post
    Next posts
Next topic

End Sub

在此图片中: enter image description here

情况反应1(正常)

我想改变情况2!

解决方案?

由于

2 个答案:

答案 0 :(得分:2)

您需要制作2个外部列并嵌套内部colums ..

<div class="row">
        <div class="col-sm-8">
            <div class="row">
                <div class="col-sm-12">
                    one
                </div>
                <div class="col-sm-12">
                    three
                </div>
            </div>
        </div>
        <div class="col-sm-4">
            <div class="row">
                <div class="col-sm-12">
                    two
                </div>
                <div class="col-sm-12">
                    four
                </div>
            </div>
        </div>
    </div>

http://www.codeply.com/go/EP61f111NO

答案 1 :(得分:0)

您可以做的是将rows堆叠在.col-md-*中以创建两个列,例如:

<div class="row">
    <!-- Left col -->
    <div class="col-md-6 col-sm-6">
        <div class="row">
            <div class="col-md-12">
                <h1>Col 1</h1>
                <p>Description</p>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <h1>Col 1</h1>
                <p>Description</p>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <h1>Col 1</h1>
                <p>Description</p>
            </div>
        </div>
    </div>

    <!-- Right col -->
    <div class="col-md-6 col-sm-6">
        <div class="row">
            <div class="col-md-12">
                <h1>Col 1</h1>
                <p>Description</p>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <h1>Col 1</h1>
                <p>Description</p>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <h1>Col 1</h1>
                <p>Description</p>
            </div>
        </div>
    </div>
</div>