Bootstrap栅栏结构

  • .container :容器

    • 屏幕<768px时,使用最大宽度(效果等同于container-full)
    • 768px≤屏幕<992px时,container的宽度为750px
    • 992px≤屏幕<1200px,container的宽度为970px
    • 1200px≤屏幕,container的宽度为1170px

    container左右各有15px的内边距

  • .row:为column的容器,最多只能放12column.行左右有-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会将字母转为大写

评论

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×