有人知道为什么右边的边框比图片高一点吗?如何保证div右边的边框和图片高度一样?
例子: http://codepen.io/anon/pen/bNPeLv
代码:
<div class="footer-widgets-2">
<img src="http://www.fertighaus-keitel.de/uploads/tx_7thsensegallery/Haus-Wiesenweg-Nacht_01.jpg" alt="Footer-Pic">
</div>
.footer-widgets-2 {
width: 810px;
border-right:1px solid #a3a3a3;
padding-right:20px;
margin-right: 20px;
}
谢谢!
最佳答案
您可以添加display: block
来移除图像上的小空间
关于html - div 的右边框应与图像具有相同的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29542145/