时间拖动条(小时)

  <div class="progress-bar">
      <div class="tooltip-box">
        <div class="tooltip-item" :style="'left: ' + 4.16 * index + '%'" v-for="(item, index) in allTimeList"
             :key="item">
          <div v-if="index == timeValue">
            <div class="tooltip-item-frame">{{ index }}:00 - {{ index + 1 }}:00</div>
            <div class="triangle_border_down">
              <span></span>
            </div>
          </div>
        </div>
      </div>
      <input ref="timeCon" type="range" value="0" step="1" min="0" max="23" v-model="timeValue" @change="timeChange" />
</div>
.progress-bar {
  padding: 0 40px;
  width: calc(100% - 80px);
  height: 24px;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.tooltip-box {
  width: 100%;
  position: relative;
}

.tooltip-item {
  position: absolute;
  top: -60px;
  color: rgba(255, 255, 255, 0.88);
  margin-left: -35px;
}

.tooltip-item-frame {
  width: 114px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background-color: #090c42;
  border: 1px solid #2242d6;
}

input {
  width: 100%;
  height: 100%;
  -webkit-appearance: none;
  background-color: #313661;
  outline: none;
  overflow: hidden;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 1);
}

input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 60px;
  height: 15px;
  background: #02fffb;
  border-radius: 4px;
  cursor: pointer;
}

/*向下*/
.triangle_border_down {
  width: 0;
  height: 0;
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: #2242d6 transparent transparent; /*灰 透明 透明 */
  margin: 0 auto;
  position: relative;
}

.triangle_border_down span {
  display: block;
  width: 0;
  height: 0;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: #090c42 transparent transparent; /*黄 透明 透明 */
  position: absolute;
  top: -11px;
  left: -8px;
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值