Add files via upload

This commit is contained in:
Sam 2023-04-06 04:14:55 +03:00 committed by GitHub
parent 21b74c3630
commit bcae72847d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<div>
<span id="rangeValue">0</span>
<input class="range" type="range" name="" value="0"
min="0" max="1000" onmousemove="range(this.value)"
onchange="range(this.value)">
</div>
<script src="main.js">
</script>
</body>
</html>

View File

@ -0,0 +1,3 @@
function range(value){
document.getElementById('rangeValue').innerHTML = value;
}

View File

@ -0,0 +1,52 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
background: #8FBC8F;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
div{
position: relative;
}
#rangeValue{
position: absolute;
top: 2px;
right: -50px;
background: #fff;
text-align: center;
width: 40px;
padding: 2px;
border-radius: 3px;
}
#rangeValue::before{
content: '';
position: absolute;
top: 50%;
left: -5px;
width: 10px;
height: 10px;
transform: translateY(-50%) rotate(45deg);
background: #fff;
}
.range{
width:250px;
height: 2px;
background: #fff;
outline: none;
}
.range::-webkit-slider-thumb,
.range::-moz-slider-thumb{
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: #f00;
color: #080;
}