JSFiddle - React, Tailwind, and code Playground

by oduska

HTML

<div id="disc">
    <div class="progress"></div>
</div>

<input type="range" min="0" max="10" id="slider">

CSS

#disc {
    width: 256px; height: 256px;
    background-image: url("http://i.imgur.com/ORAv3co.png");
    background-position: left top;
    background-repeat: no-repeat;
    position: relative;
    margin-bottom: 2em;
}

#disc .progress {
    position: absolute;
    left: 0; bottom: 0;
    width: 256px; height: 50%;
    background-image: url("http://i.imgur.com/ORAv3co.png");
    background-position: left bottom;
    background-repeat: no-repeat;
}

#slider {
    width: 256px;
}

JavaScript

$(function() {
    $('#slider').on('change', function(){
        $('.progress').css({ 'height': $('#slider').val() + "0%" });
    });
});