css+js实现全屏range滑块拖动进度条效果代码

代码语言:html

所属分类:进度条

代码描述:css+js实现全屏range滑块拖动进度条效果代码

代码标签: css js 全屏 range 滑块 拖动 进度条

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

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

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

  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Monoton&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
main {
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(to right, #ff5c5c, #ffa860, #e3dc44, #57b02a);
}
.fill-area {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  background: #333838;
  box-shadow: inset 3px 3px 5px -1px #111;
  pointer-events: none;
}
label {
  position: static;
  z-index: 1;
  font: 8rem 'Monoton', sans-serif;
  color: #ec7474;
  margin: -5rem 0 2rem;
}
label::after {
  content: '%';
}
input[type=range] {
  position: static;
  z-index: 2;
  width: 50vw;
  height: 1rem;
  background: rgba(88,36,36,0.8);
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  border: none;
  outline: none;
  border-radius: 100vmax;
  box-shadow: inset 3px 3px 5px -1px #000;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
          appearance: none;
  width: 4vw;
  height: 4vw;
  background: #eee;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 5px 5px 8px -1px #000;
  -webkit-transition: box-shadow 0.3s ease-in-out;
  transition: box-shadow 0.3s ea.........完整代码请登录后点击上方下载按钮下载查看

网友评论0