Home > Web Front-end > H5 Tutorial > body text

Detailed introduction to why the width and height of the HTML5 canvas are written in the tag

黄舟
Release: 2017-03-21 16:06:02
Original
1529 people have browsed it

In the past, when I used canvas to draw pictures, I always wrote the width and height directly in the canvas tag. There was no problem, but I never explored why the width and height should be written directly in the canvas tag, because each data This is what is written in the examples. Today, Sir Wang raised a question: If the width and height are written in