susy 使用步骤
来源:互联网 发布:印花t恤 知乎 编辑:程序博客网 时间:2024/06/05 04:44
1 . 设置全局默认配置
susy的默认配置参数
$susy: ( flow: ltr, math: fluid, output: float, gutter-position: after, container: auto, container-position: center, columns: 4, gutters: .25, column-width: false, global-box-sizing: content-box, last-flow: to, debug: ( image: hide, color: rgba(#66f, .25), output: background, toggle: top right, ), use-custom: ( background-image: true, background-options: false, box-sizing: true, clearfix: false, rem: true, ));
一般只需要重新配置:
$susy:( global-box-sizing: border-box, columns: 12, gutters: 0.25em, gutter-position: inside, container-position:center);@include border-box-sizing();
border-box-sizing 混合宏作用:
*, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}
2 . 为网站的最外部容器添加 container 混合宏
.container{@include container(); //可以不填 默认值为auto,也可以填*%或绝对数值*xp@include clearfix(); //生成代码 overflow: hidden; *zoom: 1;}
编译结果:
.container{ max-width: 1120px; margin-left: auto; margin-right: auto; overflow: hidden; *zoom: 1; }.container:after{ content: " "; display: block; clear: both; }
3 . 使用span混合宏或者span函数确定栅格的宽度
①因为span混合宏编译后会生成宽度和左浮动,所以需要在其后加break混合宏(break混合宏可以清除之前的浮动,从而新建行或者边界元素),也可以通过给span添加关键字的方式添加。
② 使用gallery混合宏处理子像素约取问题
③ gutter混合宏 为column根据gutter-position的属性设置添加padding或margin
.content{@include span(1 of 10); //默认为12列,可以通过这种方式修改列数@include break; //清除浮动//@include gutter(10); 布局为10列是padding的左右宽度(span混合宏有自带不需要写,可以做覆盖用)}
4 . padding和margin的设置
①margin
Pre 、 Post 根据布局流的方向,分别在元素左、右添加边距。
pull 根据布局流的方向,在元素之前添加负边距。 -
squish 为同一元素同时添加 左、右外边距的
②padding
Prefix、suffix 分别为元素左、右添加内边距。
Pad 同时为元素添加左右内边距。
③ Bleed 同时为元素添加向外边距和正向内边距 (bleed-x和bleed-y)
阅读全文
0 0
- susy 使用步骤
- 使用susy内置混合宏异常:Undefined mixin 'at-breakpoint'
- UCI Susy Data set
- CppUnit的使用步骤
- CppUnit的使用步骤
- ORACLE TKPROF使用步骤
- CppUnit的使用步骤
- 线程的使用步骤
- log4j使用步骤
- DWR使用步骤
- 使用CDialogBar的步骤
- log4j 使用步骤!
- 开发板使用步骤。
- power Designer 使用步骤
- TortoiseSVN使用步骤
- 使用Velocity基本步骤
- log4cxx.lib 使用步骤:
- 使用hibernate步骤
- 使用postMan实现接口测试以及接口自动化回归测试(http协议)
- Java8中List的排序
- 三十而立再出发
- java中equals方法的用法以及==的用法(转)
- python里使用string.Template怎么避免抛出异常
- susy 使用步骤
- Matlab图像数据类型unit8,double关系
- 【冒泡排序】
- camera清晰度问题
- UVALive 7749 Convex Contour——模拟
- Idea中svn账号信息清理
- 第十章 跟踪与运动 mean-shift和camshift
- Linux Jobs等前后台运行命令解
- Tensorflow 总结