PDA

View Full Version : HTML5 Canvas



drew_uk
Mar 4th, 2012, 01:20 PM
i have a sprite to move over a canvas and just wondered if i can add barriers around the edges of the canvas to stop the sprite leaving it?
thanks in advance

Lerura
Mar 4th, 2012, 06:39 PM
No there is no such thing as barriers in web coding.

If an element is not large enough to contain or show its content, it will either expand, ad scrollbar, display the exceedding content outside its borders, or discard exceeding content.

It is up to you to code it so the content is inside its border.