Html 显示亚麻改变图像高度
为什么图像会被扭曲到相同的高度?我需要保持它们的纵横比,并将它们水平分布Html 显示亚麻改变图像高度,html,css,Html,Css,为什么图像会被扭曲到相同的高度?我需要保持它们的纵横比,并将它们水平分布 从css中删除显示:flex。您可以参考此选项,flex容器可扩展项目以填充可用空间,或收缩项目以防止溢出。您可以检查 <div id='wrap'> <img id='eleph01' src='img/eleph01.gif' alt='elephant'> <img id='eleph02' src='img/eleph01.gif' alt='elephant'&g
从css中删除
显示:flex
。您可以参考此选项,flex容器可扩展项目以填充可用空间,或收缩项目以防止溢出。您可以检查
<div id='wrap'>
<img id='eleph01' src='img/eleph01.gif' alt='elephant'>
<img id='eleph02' src='img/eleph01.gif' alt='elephant'>
<img id='eleph03' src='img/eleph01.gif' alt='elephant'>
</div>
#wrap{
display:flex;
justify-content:space-between;
}
#eleph01{
width:200px;
}
#eleph02{
width:150px;
}
#eleph03{
width:100px;
}