scss Bootstrap Sass媒体查询变量

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了scss Bootstrap Sass媒体查询变量相关的知识,希望对你有一定的参考价值。

//== Media queries breakpoints

// Extra small screen / phone
$screen-xs:                  480px;
$screen-xs-min:              $screen-xs;

// Small screen / tablet
$screen-sm:                  768px;
$screen-sm-min:              $screen-sm;

// Medium screen / desktop
$screen-md:                  992px;
$screen-md-min:              $screen-md;

// Large screen / wide desktop
$screen-lg:                  1200px;
$screen-lg-min:              $screen-lg;

// So media queries don't overlap when required, provide a maximum
$screen-xs-max:              ($screen-sm-min - 1);
$screen-sm-max:              ($screen-md-min - 1);
$screen-md-max:              ($screen-lg-min - 1);

$screen: "only screen";
$xs-up: $screen;
$xs-only: "#{$screen} and (max-width: #{$screen-xs-max})";

$sm-up: "#{$screen} and (min-width: #{$screen-sm-min})";
$sm-only: "#{$screen} and (min-width: #{$screen-sm-min}) and (max-width: #{$screen-sm-max})";

$md-up: "#{$screen} and (min-width: #{$screen-md-min})";
$md-only: "#{$screen} and (min-width: #{$screen-md-min}) and (max-width: #{$screen-md-max})";

$lg-up: "#{$screen} and (min-width: #{$screen-lg-min})";

以上是关于scss Bootstrap Sass媒体查询变量的主要内容,如果未能解决你的问题,请参考以下文章

scss Bootstrap Sass媒体查询变量

如何添加“定向媒体查询”来引导4 sass媒体查询

scss Vanilla CSS媒体查询+ Sass媒体查询mixin

scss 媒体查询Sass

scss SASS媒体查询

scss 用于媒体查询的Sass mixins