What is the difference among col-lg-*, col-md-* and col-sm-* in Bootstrap?

前端 未结 11 1387
别跟我提以往
别跟我提以往 2020-11-22 14:39

What is the difference among col-lg-* , col-md-* and col-sm-* in Twitter Bootstrap?

11条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 15:07

    TL;DR

    .col-X-Y means on screen size X and up, stretch this element to fill Y columns.

    Bootstrap provides a grid of 12 columns per .row, so Y=3 means width=25%.

    xs, sm, md, lg are the sizes for smartphone, tablet, laptop, desktop respectively.

    The point of specifying different widths on different screen sizes is to let you make things larger on smaller screens.

    Example

    Meaning: 50% width on Desktops, 100% width on Mobile, Tablet, and Laptop.

提交回复
热议问题