我正在使用图形标签来显示图像。图像是垂直添加的。我尝试使用带有样式的 div 作为显示内联 block 。但这似乎不起作用。我不知道缺少什么。关于如何使其水平显示的任何想法。
<style>
figure {
display: block;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 40px;
margin-right: 40px;
}
</style>
<figure>
<img src="img_pulpit.jpg" alt="The Pulpit Rock" width="304" height="228">
</figure>
<figure>
<img src="img_pulpit.jpg" alt="The Pulpit Rock" width="304" height="228">
</figure>
<figure>
<img src="img_pulpit.jpg" alt="The Pulpit Rock" width="304" height="228">
</figure>
最佳答案
应用这个CSS,
figure {
display : inline-block;
}
关于css - 如何水平显示图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42599793/