1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        postcss-eachpostcss 迭代數(shù)值插件

        聯(lián)合創(chuàng)作 · 2023-09-24 00:23

        postcss-each 是一個 postcss 的插件,用來迭代數(shù)值。

        迭代數(shù)值:

        @each $icon in foo, bar, baz {
          .icon-$(icon) {    background: url('icons/$(icon).png');
          }
        }
        .icon-foo {  background: url('icons/foo.png');
        }.icon-bar {  background: url('icons/bar.png');
        }.icon-baz {  background: url('icons/baz.png');
        }

        通過索引值迭代數(shù)值:

        @each $val, $i in foo, bar {
          .icon-$(val) {    background: url("$(val)_$(i).png");
          }
        }
        .icon-foo {  background: url("foo_0.png");
        }.icon-bar {  background: url("bar_1.png");
        }

        迭代多重數(shù)值:

        @each $animal, $color in (puma, black), (sea-slug, blue) {
          .$(animal)-icon {    background-image: url('/images/$(animal).png');    border: 2px solid $color;
          }
        }
        .puma-icon {  background-image: url('/images/puma.png');  border: 2px solid black;  
        }.sea-slug-icon {  background-image: url('/images/sea-slug.png');  border: 2px solid blue;
        }

         

        瀏覽 20
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        評論
        圖片
        表情
        推薦
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            天天AAA无码精品级 | 色内内电影网 | aaa视频在线观看 | 国产av电影网站 亚洲成人精品导航 | 揉我胸啊嗯摸湿视频 | 日韩毛片在线 | 佘太君撅起丰满肥大的屁股 | 天天色操 | 一级干逼片 | 学生妹的一级片 |