Last active
August 29, 2015 14:25
-
-
Save mlzxy/da09e1adb9690fb0a4c4 to your computer and use it in GitHub Desktop.
Sass 通过@for生成代码例子
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
$aseq-10:10,20,30,40,50,60,70,80,90,100; | |
.h-full{ | |
height:100% !important; | |
} | |
@for $i from 1 through length($aseq-10) { | |
.h-#{nth($aseq-10,$i)}{ | |
height: nth($aseq-10,$i)+% !important; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.h-full { | |
height: 100% !important; | |
} | |
.h-10 { | |
height: 10% !important; | |
} | |
.h-20 { | |
height: 20% !important; | |
} | |
.h-30 { | |
height: 30% !important; | |
} | |
.h-40 { | |
height: 40% !important; | |
} | |
.h-50 { | |
height: 50% !important; | |
} | |
.h-60 { | |
height: 60% !important; | |
} | |
.h-70 { | |
height: 70% !important; | |
} | |
.h-80 { | |
height: 80% !important; | |
} | |
.h-90 { | |
height: 90% !important; | |
} | |
.h-100 { | |
height: 100% !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment