scss 断点,v2.scss

Posted

tags:

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

$xs: ( max:  767px );
$sm: ( min:  768px );
$md: ( min:  992px );
$lg: ( min: 1200px );
$sm-only: ( min: map-get($sm, min), max: map-get($md, min) - 1 );
$md-only: ( min: map-get($md, min), max: map-get($lg, min) - 1 );

@mixin breakpoint($map) {
  $query: "";
  @if map-has-key($map, min) { $query: append($query, "(min-width: #{map-get($map, min)})") }
  @if map-has-key($map, min) and map-has-key($map, max) { $query: append($query, "and") }
  @if map-has-key($map, max) { $query: append($query, "(max-width: #{map-get($map, max)})") }
  @media screen and #{$query} { @content; }
}

以上是关于scss 断点,v2.scss的主要内容,如果未能解决你的问题,请参考以下文章

scss SCSS响应断点

scss 断点scss mixins

scss CSS-断点,mixins.scss

scss CSS-断点,mixins.scss

scss CSS-断点,mixins.scss

scss CSS-断点,mixins.scss