HTML scrollbar canvas

I draw graphics on canvases that have large, unequal widths. Is it possible for each canvas to have its own scrollbar? I tried to put all the canvases in one div and specify the maximum width, but that did not work. Is it possible for all canvases to display 500px in the visible width on the page, and each of them has its own scroll bar to view the entire width of the canvas.

Thanks.

+7
source share
1 answer

Specify the total width of the canvas, then wrap it in a div. Set the div to overflow: scroll and specify a width of 500 pixels. Then you should have scrollbars that allow you to scroll and see hidden parts of the canvas. Repeat this for all canvases.

+17
source

All Articles