What's the difference between HTML's and CSS's width attribute?

后端 未结 7 1987
走了就别回头了
走了就别回头了 2020-11-29 07:49

The codes can be found here:

http://www.w3schools.com/css/tryit.asp?filename=trycss_float_elements




&l         


        
7条回答
  •  难免孤独
    2020-11-29 08:28

    In the case of images or the canvas element, using CSS to set dimensions changes the element (how it appears on screen) without changing the underlying bitmap (the same number of pixels are still used, but distorted to fit the CSS-specified dimensions), whereas using the HTML tag to set dimensions actually specifies the number of pixels to set for the element.

提交回复
热议问题