js+css实现4种数值滑竿取值器拖动效果代码
代码语言:html
所属分类:表单美化
代码描述:js+css实现4种数值滑竿取值器拖动效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
width: 100%;
height: 100vh;
background-color: #333;
display: grid;
grid-gap: 10px;
place-content: center;
}
.box-range {
position: relative;
width: 300px;
height: 50px;
border-radius: 3px;
background-color: #f5f5f5;
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
padding: 5px 10px;
}
.box-icon {
display: grid;
place-content: center;
color: #b39ddb;
}
#mute {
order: 1;
}
#up {
order: 3;
}
.box-icon ion-icon {
pointer-events: none;
font-size: 24px;
}
.box-icon:hover {
color: #6a1b9a;
cursor: pointer;
}
.input-range,
.input-range::-webkit-slider-thumb {
appearance: none;
-webkit-appearance: none;
}
.input-range {
width: 100%;
height: 6px;
border-radius: 6px;
background: linear-gradient(90deg, #6a1b9a 20%, #b39ddb 20%);
}
.input-range::-webkit-slider-thumb {
position: relative;
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #fff;
box-shadow: -2px 1px 2px rgba(0, 0, 0, 0.3);
cursor: pointer;
}
#range-1 {
order: 2;
}
.value,
.value2 {
position: relative;
width: 40px;
height: 40px;
border-radius: 3px;
border: 2px solid #b39ddb;
outline-color: #6a1b9a;
background-color: #b3.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0