style.less 787 Bytes
Newer Older
DarkForst's avatar
DarkForst committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
.threshold {
  margin: 0 10px 10px;
  border: 1px #BFC5D2 solid;
  border-radius: 20px;
  position: relative;
  height: 20px;
  .divide {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 1px;
    background-color: #D63649;
    left: 25%;
    z-index: 1;
  }
  .limit {
    position: absolute;
    background-color: #2E5BFF;
    top: 0;
    bottom: 0;
    left: 50%;
    right: 50%;
  }
  .overrun {
    position: absolute;
    background-color: #FF598E;
    background: linear-gradient(to right, #FF9090 , #FE5757); /* 标准的语法 */
    top: 0;
    bottom: 0;
  }
}

.singleThreshold {
  .threshold;
  .divide {
    left: 50%;
    
  }
  .limit {
    left: 0;
    right: 50%;
    border-radius: 20px 0 0 20px;
  }
  .overrun {
    left: 50%;
    right: 60%;
  }
}