我正在开始使用 Compass 和 Susy。我的目标是让我的布局适应手机、平板电脑和桌面屏幕尺寸。
在 Susy 的例子中(susy.oddbird.net http://susy.oddbird.net/guides/reference/#ref-at-breakpoint or 所以问题 https://stackoverflow.com/questions/9782914/susy-change-the-number-of-columns-according-to-screen-size),存在一种使列数适应屏幕尺寸的模式。具体来说,有如下嵌套规则:
.container {
@include container;
@include desktop {
@include container;
}
}
我现在的问题是:容器{@include container}有什么作用?而且,为什么它又嵌套在桌面包含中?
The container
mixin 确定页面的宽度。如果宽度应该改变(就像自适应布局一样),您只需要在不同的断点处重复它。如果您使用流体网格,则无需重复。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)