Html 4 列在台式机中,2 列在平板电脑中,1 列在移动设备中使用引导程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21231070/
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-08-29 00:35:24  来源:igfitidea点击:

4 columns in desktop, 2 in tablet and 1 in mobile using bootstrap

csshtmltwitter-bootstrap-3

提问by Sopo

Its very interesting and helpful to use Bootstrap, currently i am facing problem during creating following requirement.

使用 Bootstrap 非常有趣和有帮助,目前我在创建以下需求时遇到问题。

"4 columns in desktop, 2 columns in tablet and 1 column in mobile using bootstrap" can anybody tell me the correct structure

“使用引导程序在台式机中使用 4 列,在平板电脑中使用 2 列,在移动设备中使用引导程序中的 1 列”任何人都可以告诉我正确的结构

采纳答案by Anup

Not sure this is what you want, but look at this :-

不确定这是你想要的,但看看这个:-

DEMO

演示

<div class="row">
    <div class="col-md-3 col-sm-6 col-xs-12">Col 1</div>
    <div class="col-md-3 col-sm-6 col-xs-12">Col 2</div>
    <div class="clearfix visible-sm"></div>
    <div class="col-md-3 col-sm-6 col-xs-12">Col 3</div>
    <div class="col-md-3 col-sm-6 col-xs-12">Col 4</div>
</div>

--- UPDATED DEMO---

---更新演示---