css+js实现中性立体液态彩色温度滑竿效果代码

代码语言:html

所属分类:拖放

代码描述:css+js实现中性立体液态彩色温度滑竿效果代码

代码标签: css js 中性 立体 液态 彩色 温度 滑竿

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  


  
  
<style>
@charset "UTF-8";
@supports (background: paint(foo)) {
  @property --progress {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 0%;
  }
  @property --x {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 0%;
  }
  @property --y {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 0%;
  }
}
:root {
  --c1: #00adff;
  --c2: #39d469;
  --c3: #ffeb00;
  --c4: #ff8100;
  --c5: #b50f0f;
  --surface: #fffeff;
  --on-surface: #636571;
  --outline: #000001;
  --background: #112;
  --v: 1;
}

.thermostat {
  height: 24vmin;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1vmin;
  position: relative;
  place-items: center;
}

.liquid {
  position: absolute;
  inset: 0;
  border-radius: 10vmin;
  overflow: hidden;
  isolation: isolate;
}
.liquid .bg {
  position: absolute;
  inset: 0;
}
.liquid .bg:before, .liquid .bg:after {
  content: "";
  position: absolute;
  inset: 0;
  --gp: calc(100% - var(--progress));
  background: linear-gradient(to bottom, var(--c5) calc(5% - var(--gp)), var(--c4) calc(25% - var(--gp)), var(--c3) calc(50% - var(--gp)), var(--c.........完整代码请登录后点击上方下载按钮下载查看

网友评论0