Design comparison
Solution retrospective
This was my first attempt at styling something using Bootstrap so I was throwing things together as I learned it, so things may be a complete mess. I am open to all feedback.
Community feedback
- @Nazeer2020Posted about 3 years ago
for Mozilla you can use the following CSS code
.silder::-moz-range-progress { -moz-appearance: none; background-color: hsl(174, 86%, 45%); height: 100%; }
and for chrome use the following css and javascript code
input[type=range] { -webkit-appearance: none; background: linear-gradient(90deg, rgb(16, 213, 194) 0%, rgb(191,191,191) 0%); }
const Slider = document.querySelectorAll('input[type=range]');
Slider.forEach(e => { e.addEventListener('input', function () { e.style.setProperty('background',
linear-gradient(90deg, rgb(16, 213, 194) ${e.value}%, rgb(191,191,191) ${e.value}%)
);})});
0 - @Nazeer2020Posted about 3 years ago
When moving the silder its background color does not change
0@dstrickl7Posted about 3 years ago@Nazeer2020 Thank you! I did notice that but couldn't figure out how to make it work. The slider was honestly the most difficult part of this project for me.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord