使用Bootstrap栅格系统实现响应式的不同宽度的div
Bootstrap提供了栅格系统来实现响应式布局,可以用来控制网页在不同屏幕大小下的布局。栅格系统分为12列,在html中使用class命名为“col-{屏幕大小}-{列数}”来定义元素的宽度。
具体实现方法:
代码示例:
This is a div.
This is another div.
This is a third div.
This is a fourth div.