I was coding a website and found an issue like this:
These are two <div> with a <img> respectively, something like this:
Although I set the <img> to height:100%; there was still a slight gap you can see in the image above. In dev tool, it showed that the <img> itself didn’t cover the entire height of its parent <div>.
set display:block; to <img>, then the gap dispears.