progress bar

by Richard Hunter

HTML

<progress id="progressBar" class="progress-yellow" max="100" value="50"></progress>

<input type="range" value="50" id="rangeInput"/>

CSS

progress {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  color: red;
  height: 8px;
  width: 200px;
  border-radius: 10px;
  background-color: grey;
}


progress::-moz-progress-bar {
  background: #F4DD50;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

progress::-webkit-progress-bar {
  background: #F4DD50;
  border-radius: 10px;
}

progress::-webkit-progress-value {
  background: yellow;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;

}

JavaScript

rangeInput.addEventListener('input', (event) => {
	progressBar.value = event.target.value
});