Image 使用div限制图像高度
您知道如何限制div中的图像吗?我在这个网站上创建了一个类似a的网站,如果你的图像高度超过200px,它将限制为100px,底部是showig Show More有什么建议吗?你可以将最大高度和溢出设置为隐藏在图像的包装容器上Image 使用div限制图像高度,image,html,Image,Html,您知道如何限制div中的图像吗?我在这个网站上创建了一个类似a的网站,如果你的图像高度超过200px,它将限制为100px,底部是showig Show More有什么建议吗?你可以将最大高度和溢出设置为隐藏在图像的包装容器上 <div class="image"><img src="[path/to/images]" alt="" /></div> .image { max-height:100px; overflow:hidden; disp
<div class="image"><img src="[path/to/images]" alt="" /></div>
.image {
max-height:100px;
overflow:hidden;
display:inline-block;
}
.image > img {
display: block;
}