HTML5 canvas style height versus attribute height

I am currently learning how to use the new HTML5 elements, and came across a frustrating problem with all the graphical functions like fillRect () and drawImage ().

I set the width and height with

style = "width: 75px; height: 10px;"

instead

width = "200" height = "100"

The result is that the graphics will never be a suitable scale.

My question is why does it matter? I don’t understand something about all this.

thank

0
source share
1 answer

, , , JSF ( , ) , , ( ). , .

HTML5 , , - , - . , , .

, , . - , .

+1

All Articles