zoukankan      html  css  js  c++  java
  • less13 颜色值函数

    //通过十进制红色,绿色,蓝色三种值 (RGB) 创建不透明的颜色对象。
    div{
      background: rgb(255,0,0);
      background: rgb(100%,0%,0%);
    }
    
    //通过十进制红色,绿色,蓝色,以及 alpha 四种值 (RGBA) 创建带alpha透明的颜色对象。
    div1{
      background: rgba(255,0,0,0.5);
      background: rgba(100%,0%,0%,0.5);
    }
    
    //创建格式为 #AARRGGBB 的十六进制 (hex representation) 颜色 (注意不是 #RRGGBBAA !)。
    div2{
      background: argb(rgba(255,0,0,0.5));
      background: argb(rgba(100%,0%,0%,0.5));
    }
    
    //通过色相 (hue),饱和度 (saturation),亮度 (lightness) 三种值 (HSL) 创建不透明的颜色对象。
    div3{
      background: hsl(90,100%,50%);
    }
    
    //通过色相 (hue),饱和度 (saturation),亮度 (lightness),以及 alpha 四种值 (HSLA) 创建透明的颜色对象。
    div4{
      background: hsla(90,100%,50%,0.5);
    }
    
    //通过色相 (hue),饱和度 (saturation),色调 (value) 三种值 (HSV) 创建不透明的颜色对象。
    div5{
      background: hsv(90,100%,50%);
    }
    
    //通过色相 (hue),饱和度 (saturation),色调 (value),以及 alpha 四种值 (HSVA) 创建透明的颜色对象。
    div6{
      background: hsva(90,100%,50%,8%);
    }

    csss

    div {
      background: #ff0000;
    }
    div1 {
      background: rgba(255, 0, 0, 0.5);
    }
    div2 {
      background: #80ff0000;
    }
    div3 {
      background: #80ff00;
    }
    div4 {
      background: rgba(128, 255, 0, 0.5);
    }
    div5 {
      background: #408000;
    }
    div6 {
      background: rgba(64, 128, 0, 0.08);
    }
  • 相关阅读:
    运算符重载
    简单函数template max
    const static extern
    python 关闭垃圾回收
    Easy and cheap cluster building on AWS backup
    [转] Maven更新父子模块的版本号, mvn versions:set
    [转] ansible批量执行命令展示
    HBase 批量删除表 disable_all drop_all
    自动添加 ssh key 到远程主机的脚本,应用sshpass和ssh-copy-id
    MongoDB ver 4 几个常用命令
  • 原文地址:https://www.cnblogs.com/yaowen/p/7002079.html
Copyright © 2011-2022 走看看