zoukankan      html  css  js  c++  java
  • sass07 函数

    scsss

    @function double($width){  //自定义函数u
        @return $width * 2;
    }
    
    @function double($width){  //自定义函数u
        @if $width > 3px {
            //@error "大于3px";
        }
        @return $width * 2;
    }
    
    
    body{
        $color:rgb(255,255,255);
        color:$color;
        background-color:rgba($color,0.5);//透明度
        width:100px;
        height:100px;
        
        p{
            color:darken($color,2);//颜色加深
            font-size:str-length("aaaaaa");  //长度
            z-index:str-index("abcde","s");  //索引从1开始
            width:double(5px);
        }
    }
    
    @debug "This is a debug";
    //@warn "warn"
    //@error "error"

    css

    body {
      color: white;
      background-color: rgba(255, 255, 255, 0.5);
      width: 100px;
      height: 100px;
    }
    body p {
      color: #fafafa;
      font-size: 6;
      width: 10px;
    }
    
    /*# sourceMappingURL=demo1.css.map */
  • 相关阅读:
    团队项目冲刺阶段一(6)
    每日日报
    每日日报
    每日日报
    每日日报
    每日日报
    每日日报
    每日日报
    梦断代码读后感
    每日日报
  • 原文地址:https://www.cnblogs.com/yaowen/p/6998899.html
Copyright © 2011-2022 走看看