$list:zip(1px 2px 1px, solid dashed dotted, red green pink);
@for $i from 1 through 3 {
.box-#{$i} {
border: nth($list,$i);
}
}
@for $i from 1 through 3 {
.box-#{$i} {
border: nth($list,$i);
}
}
2017-09-11
ceil(1em / 5px) 的计算结果为 1em/px 但这结果并不符合CSS语法 所以不予输出 那么我想sass提供这种计算方式有何意义呢? 难道是要准备内部自己调用再次复合计算的意思吗?
2017-09-11
content: quote("hi,\"Danny\""); 试试这个看输出!哈哈哈哈哈哈
2017-09-11
@for $i from 1 through 12{
.col-#{$i} {
width: 100/12*$i + "%";
}
}
.col-#{$i} {
width: 100/12*$i + "%";
}
}
2017-09-10
.btn{
text: map-keys($newmap);
text2: map-values($newmap);
link: map-get($newmap,link);
}
编译结果:
.btn {
text: text, link, border, backround, font-size, line-height;
text2: #f36, #f63, #ddd, #fff, 12px, 1.6;
link: #f63;
}
text: map-keys($newmap);
text2: map-values($newmap);
link: map-get($newmap,link);
}
编译结果:
.btn {
text: text, link, border, backround, font-size, line-height;
text2: #f36, #f63, #ddd, #fff, 12px, 1.6;
link: #f63;
}