javascript - HTML5 How to make canvas not stretch page? -
i have learned how work canvases in html5, , have question.
is there way create canvas not stretch other elements on page? illustration have text, if set canvas of 500px wide, text sent right create space canvas, there way set canvas under text or create not stretch other elements in page, or there technique used appropriately position canvases in way want exactly?
thanks help.
just treat canvas treat div. way size/position div, can same canvas. if having specific problem adjusting canvas, post code using.
edit : also, careful if setting canvas height/width css changes element size, not drawing surface size. create sure both element , drawing surface size changes, utilize width , height attribute.
javascript html5 css3 canvas stretch
No comments:
Post a Comment