Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: HTML5 Canvas

  1. #1
    New Coder
    Join Date
    Mar 2012
    Posts
    14
    Thanks
    3
    Thanked 1 Time in 1 Post

    HTML5 Canvas

    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

  • #2
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    947
    Thanks
    0
    Thanked 130 Times in 129 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •