zoukankan      html  css  js  c++  java
  • [SCSS] Create a gradient with a Sass loop

    In this lesson, you will learn how to iteratively generate CSS selectors and attributes using Sass loops. We will create a gradient of 100 elements, each with 1% darker colour using only a couple of lines of Sass.

    @for $i from 1 through 100 {
      .block#{$i} {
        background: darken(white, $i);
      }
    }
  • 相关阅读:
    java 28
    java 28
    java 27
    java 27
    java 27
    java 27
    java 27
    java 27
    java 27
    java 27
  • 原文地址:https://www.cnblogs.com/Answer1215/p/10212193.html
Copyright © 2011-2022 走看看