scss SCSS响应断点

Posted

tags:

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

@mixin phone {
  @media (max-width: 320px) { @content; }
}
@mixin tablet {
  @media (min-width: 600px) { @content; }
}
@mixin tablet-landscape {
  @media (min-width: 900px) { @content; }
}
@mixin desktop {
  @media (min-width: 1200px) { @content; }
}
@mixin desktop-large {
  @media (min-width: 1800px) { @content; }
}
@import 'breakpoints';

#app {
  @include phone { /* Style for smartphones. */}
  @include tablet { /* Style for tablets. */}
  @include tablet-landscape { /* More width than a tablet in portrait mode. */}
  @include desktop { /* Things available only for desktop users. */}
  @include desktop-large { /* To display fancy styles to large-desktop users. */}
}

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

scss 响应断点混合

scss CSS-断点,mixins.scss

scss 断点scss mixins

scss CSS-断点,mixins.scss

scss CSS-断点,mixins.scss

scss CSS-断点,mixins.scss