I have done a mobile function to simulate scrolling. The scrolling container contains pictures arranged vertically. At the beginning, I wrote the width and height of the pictures in css. Because the simulated scrolling needs to obtain the height of the container, but in this case, the height obtained is always dozens of pixels smaller than the actual height, resulting in scrolling not to the end. Later, it is normal to set the width and height on the width and height properties of img.
so for a picture, what"s the difference between setting width and height in css and setting width and height in the width height property?