Home games HTML5 Game 1: Setup The Canvas

HTML5 Game 1: Setup The Canvas

by admin



Next: http://youtu.be/DMIkh2o8xrE
Source Version: http://lifeofadreamer.com/html5-game-framework-part-1-setup-the-canvas/

Setting up the webpage “index.html” canvas element to display our stuff.

Twitter ► http://brentfarris.com/twitter
Website ► http://brentfarris.com
GitHub ► http://brentfarris.com/github

source

Related Videos

6 comments

@xeroplayz7474 August 11, 2024 - 1:08 pm

<style type="text/css">
* {margin:0;padding:0;}

html, body
{
background-color: #000;
overflow: hidden;
height: 100%;
}

It doesn't work for me

@AAundead August 11, 2024 - 1:08 pm

*height

@geoffreybaum377 August 11, 2024 - 1:08 pm

This looks like an awesome tutorial I'm glad I found it!!

@BrentFarris August 11, 2024 - 1:08 pm

This would be true in most cases, such as working with a big team or having multiple objects use the same style. However this HTML document has about 5 lines of code and really is no need for any CSS file. In fact it would be easier just to stick it into a "style" tag in the head (which is a better choice in small files). There is no issues with working with in-line styles in this case (mostly because of its tiny size and being a test bed).

So in this case I would dis-agree.

@jscrproductions August 11, 2024 - 1:08 pm

Dont use inline styles! stick it all in its own css file

@BrentFarris August 11, 2024 - 1:08 pm

@PcCouchPotato Yes, thank you 🙂

Comments are closed.