HTML and CSS Reference
In-Depth Information
Listing 6.5. game.jsā€”Brick array creation
No box model?
If you've worked with CSS, you're probably familiar with the box model, which determines
layout and positioning of HTML elements. Canvas doesn't use it, meaning shapes won't
grow and shrink to the proportion of their container; instead, they overflow without stop-
ping. A line of text that's too long, for example, won't automatically wrap to fit the <can-
 
Search WWH ::




Custom Search