gpt4 book ai didi

html - 如何使div中的子元素垂直居中

转载 作者:太空狗 更新时间:2023-10-29 13:07:51 30 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How to make an image center (vertically & horizontally) inside a bigger div

HTML代码:

<div class="promo_tumbs col_12">
<div class="promo_tumb"></div>
<div class="promo_tumb"></div>
<div class="promo_tumb"></div>
<div class="promo_tumb"></div>
<div class="promo_tumb"></div>
</div>

CSS 部分:

.promo_tumbs {
height: 155px;
background: #058;
}
.promo_tumb {
height: 75px;
width: 125px;
background: #990000;
float: left;
margin: 0 10px;
text-align: center;
}

如何垂直居中 .promo_tumb

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