html
How to set the img tag so that the image fits the img size exactly? ? There are height and width attributes that can set the image sizeWho does it mean that the image exactly fits the size of the img? There are height and width attributes that can set the image size
. That is, no matter how big or small the image is, it can be displayed exactly in the img
What does it mean that the picture fits exactly into the img size? There are height and width attributes that can set the image size
That is, no matter how big or small the image is, it can be displayed exactly in the img
Are you saying that there is a parent container outside the img, and then the size of the image is consistent with Same as the parent container?
Just don’t set the width and height of img. The default of img is the width and height of the image.