<div class="rate">
<div class="emoji">😑</div>
<input type="range" min="0" max="4" step="1">
</div>
body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.rate {
text-align: center;
width: 200px;
height: 200px;
ouline: thin solid lightgray;
}
.emoji {
font-size: 120px;
height: 170px;
line-height: 170px;
}
input {
cursor: ew-resize;
}
View Compiled
var emojis = ['😠','😦','😑','😀','😍'];
$("input").mousemove(function(){
var i = $(this).val();
$(".emoji").html(emojis[i]);
});
This Pen doesn't use any external CSS resources.