我在学习一些html,我不知道我在做什么错。我有3个图像,我想要在像| |这样的水平线上img 1 | img 2 | img 3 |。使用外部div容器im有足够的空间来适应所有3个图像。如何在html中显示同一行上的图像
我试过使用内联块,内联和浮动,但这些不起作用。
这里是我的了:
<div id="banner" style="overflow: hidden; display: inline-block;">
<div class="" style="max-width: 20%; max-height: 20%;">
<img src ="img1.jpg">
</div>
<div class="" style="max-width: 100%; max-height: 100%;">
<img src ="img2.jpg">
</div>
<div class="" style="max-width: 20%; max-height: 20%;">
<img src ="img3.jpg">
</div>
</div>
你检查在Flexbox的? – EQuimper
最大宽度的总和大于100%,如果将第二个减少到60%,它会起作用吗? – starturtle