0
I’ve seen this on many websites, but some using Javascript or box-shadow
, only that neither of the two is functional for the project (is being done in Wordpress).
<!DOCTYPE html>
<html>
<head>
<div class="slidecontainer">
<html>
<head>
<title>HTML Font</title>
</head>
<body>
</head>
<body>
<p>R$<span id="demo"></span> </p>
<input type="range" step=100 min="300" max="5000" value="50" class="slider" id="myRange">
</div>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.slidecontainer {
width: 70%;
}
.slider {
-webkit-appearance: none;
width: 70%;
height: 5px;
border-radius: 5px;
background: #feae98;
outline: 20px;
opacity: 0.7;
-webkit-transition: .20s;
transition: opacity .20s;
}
.slider:hover {
opacity: 1;
}
input[type=range]::-moz-range-track {
background-color: green;
}
.slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 15px;
height: 15px;
border-radius: 100%;
background: #feee00;
cursor: pointer;
}
.slider::-moz-range-thumb {
width: 20px;
height: 20px;
border-radius: 100%;
background: none;
cursor: pointer;
}
</style>
</head>
<body>
<script>
var slider = document.getElementById("myRange");
var output = document.getElementById("demo");
var sliderparcelas = document.getElementById("myparcelas");
var meses = document.getElementById("parcelas");
var conta = document.getElementById("sozinho");
slider.oninput = function() {
output.innerHTML = this.value;
conta.innerHTML = (this.value)/slider.value;
}
sliderparcelas.oninput = function() {
meses.innerHTML = this.value;
conta.innerHTML = (slider.value)/this.value;
}
</script>
</body>
</html>