Specifying Height and Width on the Canvas Element

Share this video with your friends

Send Tweet

Let's take a look at a bug you can run across, by not specifying height and width of your HTML canvas element. We will look at giving the canvas element a height and width property inline. We’ll also look at how we can alternatively give canvas those height and width properties right in our Javascript.

Steven
Steven
~ 7 years ago

Why does the 50x50 square display properly in video 1 at 2:29, but not in this video at 0:40?