使用Bootstrap推拉

时间:2017-08-22 21:56:48

标签: html5 push pull hubspot

我已经四处搜索并找到了这个帖子:Bootstrap Alternating Layout to stacked in mobile

但是,当我向我的代码添加推送和拉动时,即使在完整的桌面视图中也会发生推拉。

例如:

<section class="block block--2">

<div class="container">

    <div class="row padbot20">
        <div class="col-md-4 center col-sm-12 col-xs-12">
             <center>
                 <i class="fa_black_icon fa fontawesome-icon fa-address-book"></i>
             </center>
        </div>
        <div class="col-md-8 col-sm-12 col-xs-12">
            <div class="heading padbot20">
                <h3 class="black_txt">
                    {% text "section_2_row_1_heading", overrideable=True, value="Supplier Management", label="Section 2 Row 1 Heading", no_wrapper=True %}
                </h3>
            </div>
            <div class="row-paragraph">
                 {% rich_text "section_2_row_1_content", overrideable=True, value="<p>With Volo, you’ll can keep all your key supplier information up to date so you know exactly where you are. Monitor the prices you’re paying for your stock, use automated data feeds to increase productivity, or use drop-shippers to do the product storage and delivery for you – the choice is yours.</p>", label="Section 2 Row 1 Content", no_wrapper=True %}
            </div>
        </div>


    </div>

    <div class="row padtop20 padbot20">
        <div class=" col-md-8 ">
            <div class="heading padbot20">
                <h3 class="black_txt">
                    {% text "section_2_row_2_heading", overrideable=True, value="Inventory & Stock Control ", label="Section 2 Row 2 Heading", no_wrapper=True %}
                </h3>
            </div>
            <div class="row-paragraph">
                 {% rich_text "section_2_row_2_content", overrideable=True, value="<p>Control your physical and virtual inventory data across all your sales channels with Volo, from single custom items through to managing millions of SKUs and variations. We’ve made it simple: one central location for storing all the information needed for the different channels. Sell items on one channel and we’ll automatically update the rest.</p>", label="Section 2 Row 2 Content", no_wrapper=True %}
            </div>
        </div>
        <div class="col-md-4 center">
             <center>
                 <i class="fa_black_icon fa fontawesome-icon fa-cubes"></i>
             </center>
        </div>
    </div>

    <div class="row padtop20 padbot20">
        <div class="col-md-4 center col-sm-12 col-xs-12">
             <center>
                 <i class="fa_black_icon fa fontawesome-icon fa-sitemap"></i>
             </center>
        </div>
        <div class="col-md-8 col-sm-12 col-xs-12">
            <div class="heading padbot20">
                <h3 class="black_txt">
                    {% text "section_2_row_3_heading", overrideable=True, value="Multichannel Management", label="Section 2 Row 3 Heading", no_wrapper=True %}
                </h3>
            </div>
            <div class="row-paragraph">
                 {% rich_text "section_2_row_3_content", overrideable=True, value="<p>Selling successfully is about being in the right places, responding quickly and capitalizing on the opportunities. We’ll enable you to reach new markets, new audiences, and new sales targets. Volo gives you resilience across all your channels</p>", label="Section 2 Row 3 Content", no_wrapper=True %}
            </div>
        </div>
    </div>

    <div class="row padtop20 padbot20">
        <div class="col-md-8 col-sm-12 col-xs-12">
            <div class="heading padbot20">
                <h3 class="black_txt">
                    {% text "section_2_row_4_heading", overrideable=True, value="Order Management", label="Section 2 Row 4 Heading", no_wrapper=True %}
                </h3>
            </div>
            <div class="row-paragraph">
                 {% rich_text "section_2_row_4_content", overrideable=True, value="<p>At Volo, our approach is to help bring together all your sales information into a single, coherent view so you can streamline your processes. From matching orders to payments quickly, through to shipping list for packing, manifests for shipments, and invoice and delivery documentation.</p>", label="Section 2 Row 4 Content", no_wrapper=True %}
            </div>
        </div>
        <div class="col-md-4 center col-sm-12 col-xs-12">
             <center>
                 <i class="fa_black_icon fa fontawesome-icon fa-credit-card"></i>
             </center>
        </div>
    </div>
    <div class="row padtop20 padbot20">
        <div class="col-md-4 center col-sm-12 col-xs-12">
             <center>
                 <i class="fa_black_icon fa fontawesome-icon fa-truck"></i>
             </center>
        </div>
        <div class="col-md-8 col-sm-12 col-xs-12">
            <div class="heading padbot20">
                <h3 class="black_txt">
                    {% text "section_2_row_5_heading", overrideable=True, value="Shipping", label="Section 2 Row 5 Heading", no_wrapper=True %}
                </h3>
            </div>
            <div class="row-paragraph">
                 {% rich_text "section_2_row5_content", overrideable=True, value="<p>We can help you reduce time and costs by implementing a completely integrated fulfillment process. You’ll be able to connect your carriers, shipping aggregators and consolidators into one system, giving you effective and efficient control.</p>", label="Section 2 Row 5 Content", no_wrapper=True %}
            </div>
        </div>
    </div></div></section>

然而,当我添加推拉时,我在桌面版本上出现了巨大的差距,并且推送和拉动仍然应用,尽管添加&#34; col-xs-push-12&#34;和&#34; col-xs-pull-12&#34;代码示例(和屏幕截图) -

截图: 代码:

        <section class="block block--2">

        <div class="container">

            <div class="row padbot20">
                <div class="col-md-4 center col-sm-12 col-xs-12">
                     <center>
                         <i class="fa_black_icon fa fontawesome-icon fa-address-book"></i>
                     </center>
                </div>
                <div class="col-md-8 col-sm-12 col-xs-12">
                    <div class="heading padbot20">
                        <h3 class="black_txt">
                            {% text "section_2_row_1_heading", overrideable=True, value="Supplier Management", label="Section 2 Row 1 Heading", no_wrapper=True %}
                        </h3>
                    </div>
                    <div class="row-paragraph">
                         {% rich_text "section_2_row_1_content", overrideable=True, value="<p>With Volo, you’ll can keep all your key supplier information up to date so you know exactly where you are. Monitor the prices you’re paying for your stock, use automated data feeds to increase productivity, or use drop-shippers to do the product storage and delivery for you – the choice is yours.</p>", label="Section 2 Row 1 Content", no_wrapper=True %}
                    </div>
                </div>


            </div>

            <div class="row padtop20 padbot20">
                <div class="col-md-8 col-sm-push-12 col-xs-push-12">
                    <div class="heading padbot20">
                        <h3 class="black_txt">
                            {% text "section_2_row_2_heading", overrideable=True, value="Inventory & Stock Control ", label="Section 2 Row 2 Heading", no_wrapper=True %}
                        </h3>
                    </div>
                    <div class="row-paragraph">
                         {% rich_text "section_2_row_2_content", overrideable=True, value="<p>Control your physical and virtual inventory data across all your sales channels with Volo, from single custom items through to managing millions of SKUs and variations. We’ve made it simple: one central location for storing all the information needed for the different channels. Sell items on one channel and we’ll automatically update the rest.</p>", label="Section 2 Row 2 Content", no_wrapper=True %}
                    </div>
                </div>
                <div class="col-md-4 center col-sm-pull-12 col-xs-pull-12">
                     <center>
                         <i class="fa_black_icon fa fontawesome-icon fa-cubes"></i>
                     </center>
                </div>
            </div>

            <div class="row padtop20 padbot20">
                <div class="col-md-4 center col-sm-12 col-xs-12">
                     <center>
                         <i class="fa_black_icon fa fontawesome-icon fa-sitemap"></i>
                     </center>
                </div>
                <div class="col-md-8 col-sm-12 col-xs-12">
                    <div class="heading padbot20">
                        <h3 class="black_txt">
                            {% text "section_2_row_3_heading", overrideable=True, value="Multichannel Management", label="Section 2 Row 3 Heading", no_wrapper=True %}
                        </h3>
                    </div>
                    <div class="row-paragraph">
                         {% rich_text "section_2_row_3_content", overrideable=True, value="<p>Selling successfully is about being in the right places, responding quickly and capitalizing on the opportunities. We’ll enable you to reach new markets, new audiences, and new sales targets. Volo gives you resilience across all your channels</p>", label="Section 2 Row 3 Content", no_wrapper=True %}
                    </div>
                </div>
            </div>

            <div class="row padtop20 padbot20">
                <div class="col-md-8 col-sm-12 col-xs-12">
                    <div class="heading padbot20">
                        <h3 class="black_txt">
                            {% text "section_2_row_4_heading", overrideable=True, value="Order Management", label="Section 2 Row 4 Heading", no_wrapper=True %}
                        </h3>
                    </div>
                    <div class="row-paragraph">
                         {% rich_text "section_2_row_4_content", overrideable=True, value="<p>At Volo, our approach is to help bring together all your sales information into a single, coherent view so you can streamline your processes. From matching orders to payments quickly, through to shipping list for packing, manifests for shipments, and invoice and delivery documentation.</p>", label="Section 2 Row 4 Content", no_wrapper=True %}
                    </div>
                </div>
                <div class="col-md-4 center col-sm-12 col-xs-12">
                     <center>
                         <i class="fa_black_icon fa fontawesome-icon fa-credit-card"></i>
                     </center>
                </div>
            </div>
            <div class="row padtop20 padbot20">
                <div class="col-md-4 center col-sm-12 col-xs-12">
                     <center>
                         <i class="fa_black_icon fa fontawesome-icon fa-truck"></i>
                     </center>
                </div>
                <div class="col-md-8 col-sm-12 col-xs-12">
                    <div class="heading padbot20">
                        <h3 class="black_txt">
                            {% text "section_2_row_5_heading", overrideable=True, value="Shipping", label="Section 2 Row 5 Heading", no_wrapper=True %}
                        </h3>
                    </div>
                    <div class="row-paragraph">
                         {% rich_text "section_2_row5_content", overrideable=True, value="<p>We can help you reduce time and costs by implementing a completely integrated fulfillment process. You’ll be able to connect your carriers, shipping aggregators and consolidators into one system, giving you effective and efficient control.</p>", label="Section 2 Row 5 Content", no_wrapper=True %}
                    </div>
                </div>
            </div>

            <div class="row padtop20 padbot20">
                <div class="col-md-8 col-sm-12 col-xs-12">
                    <div class="heading padbot20">
                        <h3 class="black_txt">
                            {% text "section_2_row_6_heading", overrideable=True, value="Reporting & Analytics", label="Section 2 Row 6 Heading", no_wrapper=True %}
                        </h3>
                    </div>
                    <div class="row-paragraph">
                         {% rich_text "section_2_row_6_content", overrideable=True, value="<p>Volo reporting & analytics turns your performance data into information, giving you the knowledge and confidence to make quick decisions that positively impact all the things you measure your success by: revenues, profits and cash flow.</p>", label="Section 2 Row 6 Content", no_wrapper=True %}
                    </div>
                </div>
                <div class="col-md-4 center col-sm-12 col-xs-12">
                     <center>
                         <i class="fa_black_icon fa fontawesome-icon fa-pie-chart"></i>
                     </center>
                </div>
            </div> 
        </div>

    </section>

但接下来会发生这种情况: https://gyazo.com/7a39f8711b274eda998d48eae5278634

我做错了什么?

任何建议都将不胜感激 - 谢谢

1 个答案:

答案 0 :(得分:0)

您必须维护以下代码。

关于 - 外观和感觉

您的代码结构看起来需要单行 2列

桌面版中的设计应为 col-md-4 col-md-8

在移动设备和平板电脑设备中,设计应该像 col-sm-12 这样的删除列。

创建如下所示的代码结构,并确保维护代码的稳定性如下所示。

<section class="">
    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-push-8 col-sm-12">Icon</div>
            <div class="col-md-8 col-md-pull-4 col-sm-12">Details will be here.</div>
        </div>
        <div class="row">
            <div class="col-md-4 col-sm-12">Icon</div>
            <div class="col-md-8 col-sm-12">Details will be here.</div>
        </div>
        <div class="row">
            <div class="col-md-4 col-md-push-8 col-sm-12">Icon</div>
            <div class="col-md-8 col-md-pull-4 col-sm-12">Details will be here.</div>
        </div>
        <div class="row">
            <div class="col-md-4 col-sm-12">Icon</div>
            <div class="col-md-8 col-sm-12">Details will be here.</div>
        </div>
    </div>
</section>

希望它可以帮助你..干杯:)。