gpt4 book ai didi

html - 缩略图图像未水平对齐

转载 作者:太空宇宙 更新时间:2023-11-04 09:34:43 24 4
gpt4 key购买 nike

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>

<div class="container-fluid">
<div class="row">
<div class="col-md-4"><br><br><img src="images\smartphone.png" class="img-circle" alt="" width="243" height="241" align="middle"><br><h4 style="color:#1E7145" align="center">Smart Phone</h4></div>
<div class="col-md-4"><br><br><img src="images\oldphone.png" class="img-circle" alt="" width="243" height="241" align="middle"><br><h4 style="color:#1E7145" align="center">Basic Phone</h4></div>
<div class="col-md-4"><br><br><img src="images\tab.png" class="img-circle" alt="" width="243" height="241" align="middle"><br><h4 style="color:#1E7145" align="center">Tablet</h4></div>
</div>
</div>

缩略图未居中,文字居中,图片居左,有解决办法吗?

最佳答案

请使用 flex 尝试以下代码:

.imager div{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;

}

<div class="container-fluid">
<div class="row imager">
<div class="col-md-4"><br><br><img src="images\smartphone.png" class="img-circle" alt="" width="243" height="241" align="middle"><br><h4 style="color:#1E7145" align="center">Smart Phone</h4></div>
<div class="col-md-4"><br><br><img src="images\oldphone.png" class="img-circle" alt="" width="243" height="241" align="middle"><br><h4 style="color:#1E7145" align="center">Basic Phone</h4></div>
<div class="col-md-4"><br><br><img src="img-circle" class="img-circle" alt="" width="243" height="241" align="middle"><br><h4 style="color:#1E7145" align="center">Tablet</h4></div>
</div>
</div>

关于html - 缩略图图像未水平对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40447978/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com