<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;
}