scss Sass / Scss Loop
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了scss Sass / Scss Loop相关的知识,希望对你有一定的参考价值。
.image {
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
@for $i from 1 through 4 {
&--#{$i} {
background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../img/apply/expect-'+ $i + '.jpg');
}
}
}
@for $i from 1 through 100 {
.flex-xs-#{$i} {
flex: 1 round(percentage($i/100)); // flex-xs-1 ... flex-xs-100
}
}
以上是关于scss Sass / Scss Loop的主要内容,如果未能解决你的问题,请参考以下文章
SCSS/SASS 指南
sass和scss区别?
scss scss_sass_if.scss
如何将scss转换成css文件
scss scss_sass创建-classes.scss
sass和scss