blog_freebie_1We’ve noticed that you can find a million plugins online to create basic Range Sliders for mobile devices but most of them, if not all, are running on jQuery plugins. This would be awesome 5 years ago, but as technology evolved, Range Sliders now work using simple, nike kwazi femme basic, awesome CSS! Let’s see how!


<div class="ranger-wrapper"> <p>How much?</p> <input type="range" value="10" class="range-slider"> </div>

The code above will generate our range slider. christian louboutin The first line and the last will be the housing class of the range slider. New Balance 577 homme Inside, we’ll keep a paragraph of text for obvious reasons, and a classic input field. Replace the value with anything from 0 to 100 according to your needs!


.range-slider{ -webkit-appearance: none; width: 150px; height: 20px; margin: 10px 50px; background: linear-gradient(to right,  nike air huarache ultra uomo #ececec 0%,  ugg boots bailey #ececec 100%); border-radius:20px!important; background-size: 120px 5px; background-position: center; background-repeat: no-repeat; overflow: hidden; outline: none; zoom: 130%; display: block; margin: auto; } .range-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; background: #2ecc71; position: relative; z-index: 3; border:none!important; border-radius:30px; } .range-slider::-webkit-slider-thumb:after { content: " "; width: 150px; height: 10px; position: absolute; z-index: 1; right: 20px; top: 5px; }

The CSS behind the range slider is very easy as well. chaussure asics pas cher We begin by styling the the main line, nike free 4.0 v2 uomo not to get too technical with you, adidas zx 750 homme the CSS code will simply replace the default style shown by your mobile browser, and add some styling guides. You can replace the width and height of the range slider itself on lines 3 and 4, Nike Air Max Thea Femme Rose and the background color on line 6. Resizing the slider ball can easily be done on lines 20 and 21 and it’s background color is set on line 22. Nike Air Presto Femme And there you have it! Not a lot to say about it,