【问题标题】:setting breakpoints in sass with min and max width在 sass 中以最小和最大宽度设置断点
【发布时间】:2014-08-12 10:15:24
【问题描述】:

大家好,我正在尝试使用响应式布局,但不知何故我无法修复此布局的最小宽度。

$mobile: new-breakpoint(max-width 480px 4);
$tablet: new-breakpoint(max-width 768px 8);
$desktop: new-breakpoint(max-width 1336px 10);
$desktopxl: new-breakpoint(max-width 1550px 10);

不知何故,我希望 $desktopxl 仅在 1337px1550px 之间使用 但是i am not able to set the min width。请帮我。 谢谢。 ps: **我试过了

 $desktopxl: new-breakpoint((max-width: 699px) and (min-width: 520px)10);

但是没用。

【问题讨论】:

    标签: css responsive-design sass media-queries neat


    【解决方案1】:

    你不需要最小和混合。 您需要做的就是在最大宽度旁边做最小。 像例如。如果你的最大宽度是700px 游览下一级最小宽度应该是701px;

    试试这个

    $mobile: new-breakpoint(max-width 480px 4);
    $tablet: new-breakpoint(max-width 768px 8);
    $desktop: new-breakpoint(min-width 779px 10);
    $desktopxl: new-breakpoint(min-width 1337px 10);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-30
      • 2012-11-13
      • 1970-01-01
      相关资源
      最近更新 更多