居中图像,下方有文字 [英] Centre images with text below
问题描述
我正在为一个学校项目开发一个网站,我正在尝试让图像显示在页面上,下面是文本.我已经研究它很久了,但我似乎什么也做不了,我也尝试过设置边距.我已经没有想法了.现在显示图像,但都被推到左侧而不是中间均匀分布.谢谢
.middle {位置:相对;溢出:隐藏;}.rowone {向左飘浮;宽度:200px;边距:1% 1% 45px 1%;}.文本 {位置:绝对;底部:0px;边距:30px;背景颜色:灰色;}.rowone img {宽度:100%;显示:块;}
<div class="rowone"><img src="images/logofootball.png" height="200" width="200"><div class="text">Text</div>
<div class="rowone"><img src="images/logofootball.png" height="200" width="200"><div class="text">Text</div>
<div class="rowone"><img src="images/logofootball.png" height="200" width="200"><div class="text">Text</div>
<div class="rowone"><img src="images/logofootball.png" height="200" width="200"><div class="text">Text</div>
</section>