- Real-Time 3D Graphics with WebGL 2
- Farhad Ghayour Diego Cantor
- 55字
- 2021-06-10 19:42:51
Understanding Canvas Attributes
There are three attributes in our previous example:
- id: This is the canvas identifier in the DOM.
- width and height: These two attributes determine the size of our canvas element. When these two attributes are missing, Firefox, Chrome, and WebKit will default to using 300px by 150px.