Bootstrap栅栏结构
.container
:容器- 当
屏幕<768px
时,使用最大宽度(效果等同于container-full
) - 当
768px≤屏幕<992px
时,container的宽度为750px - 当
992px≤屏幕<1200px
,container的宽度为970px - 当
1200px≤屏幕
,container的宽度为1170px
container左右各有15px的内边距
- 当
.row
:为column
的容器,最多只能放12
个column
.行左右有-15px
的外边距.只有column
才能作为row
的直接子元素.内容应当放在column
中column
:列,通过指定1-12
的值来表示其跨越的范围.例如,三个等宽的列可以使用3个.col-xs-4
来创建列偏移
:不必设置margin
属性,可以通过列偏移实现.类分别为:.offset-xs-*
、.offset-sm-*
、.offset-md-*
、.offset-lg-*
,其中*
为数字,表示向右偏移的列数.等宽布局:
.col
自动填满等宽.w-100
:宽度为100%的div.align-items-center
:在row上设置,垂直居中(start、end).align-self-center
:在每个column中设置,垂直居中(start、end).justify-content-center
:水平对齐(start、end、around、between)order-*
:排序,数字越小越往前.第一个可以写order-first
<abbr title=""></abbr>
:缩略语.加上.initialism
会将字母转为大写