CSS media query resolution in Bootstrap @media (min-width)

Media queries are very fancy "conditional CSS rules". It only works with some CSS based on certain specified conditions. If those conditions are met, the corresponding style is applied.

Media queries in Bootstrap allow you to move, show, and hide content based on the viewport size. The following media query is used in the LESS file to create key breakpoint thresholds in the Bootstrap grid system.

/* 超小设备(手机,小于 768px) */
/* Bootstrap 中默认情况下没有媒体查询 */

/* 小型设备(平板电脑,768px 起) */
@media (min-width: @screen-sm-min) { ... }

/* 中型设备(台式电脑,992px 起) */
@media (min-width: @screen-md-min) { ... }

/* 大型设备(大台式电脑,1200px 起) */
@media (min-width: @screen-lg-min) { ... }

We also sometimes include max-width in the media query code to limit the impact of CSS to a smaller range of screens Within size.

@media (max-width: @screen-xs-max) { ... }
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { ... }
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) { ... }
@media (min-width: @screen-lg-min) { ... }

Guess you like

Origin blog.csdn.net/ffffffff8/article/details/134061313