简体   繁体   English

Bootstrap 左右 Div 块对齐

[英]Bootstrap Left & Right Div Block Alignment

Is there any class available in Bootstrap to make Div Block to make Left, Right and showing form control when Screen getting narrow or on a Mobile view that Left, Right View would go Up, Down. Bootstrap 中是否有任何可用的类来使 Div 块在屏幕变窄或在移动视图上左、右视图向上、向下时制作左、右和显示表单控件。 One other main thing is that only the div blocks are left and right align but each control in the div blocks should be left aligned.另一件主要的事情是只有 div 块是左右对齐的,但 div 块中的每个控件都应该左对齐。 Searching in BS document but not able find anything.在 BS 文档中搜索但找不到任何内容。

*Please Ignore Blue Div in 1st Image (Accidental) *请忽略第一张图片中的蓝色 Div(意外) 在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

Yes obviously, we have row and columns to achieve this layout是的,显然,我们有行和列来实现这种布局

 <body>
    <div class="container">
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                Div Left
            </div>
            <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">
                Div Right
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                Bottom Panel
            </div>
        </div>
    </div>
</body>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM