Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我之前的问题在这里得到了回答:两个浮动的 div 并排,相同的高度
我的问题:有人在这里提供了一个例子:http: //jsfiddle.net/s7ufg/18/
如何删除图像下方的多余空间?
将 vertical-align:top 添加到您的 img 规则中:
img { max-width: 100%; height: auto; width: auto; vertical-align:top; }
jsFiddle 示例
display:block;到图像解决它
display:block;
img { display:block; max-width: 100%; height: auto; width: auto; }