scss mixin for css断点

Posted

tags:

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

@mixin for-size($size) {
  @if $size == phone-only {
    @media (max-width: 599px) { @content; }
  } @else if $size == tablet-portrait-up {
    @media (min-width: 600px) { @content; }
  } @else if $size == tablet-landscape-up {
    @media (min-width: 900px) { @content; }
  } @else if $size == desktop-up {
    @media (min-width: 1200px) { @content; }
  } @else if $size == big-desktop-up {
    @media (min-width: 1800px) { @content; }
  }
}

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

scss CSS-断点,mixins.scss

scss CSS-断点,mixins.scss

scss CSS-断点,mixins.scss

scss CSS-断点,mixins.scss

scss CSS-断点-mixin的1.scss

scss CSS-断点-mixin的vars.scss