Jquery Brush Size Slider for Canvas HTML5
问题 Hello I'm trying to create a brush size slider for my Canvas drawing app, would anyone be able to assist in how to go about this?? A few of the approaches I have found weren't compatible with my Jquery library that I have running my app. thank you :) 回答1: Easy: Create an input element of type range : <input type=range min=1 max=100 id=brushSize> Read its value and apply to lineWidth of the context: $("#brushSize").on("input", function(e) { ctx.lineWidth = $(this).val() }); $("#brushSize").on(