gpt4 book ai didi

html - 垂直对齐表格单元格中心的文本

转载 作者:太空宇宙 更新时间:2023-11-03 23:30:37 26 4
gpt4 key购买 nike

我知道之前在此站点上已经提出并回答过类似的问题,但不幸的是,没有一个答案能够提供帮助。

我需要我的文本在表格行的中心/底部垂直对齐。这是我的 CSS 文本:

h3 {
vertical-align:bottom;
font-weight: lighter;
padding-top: 0px;
background: url(images/bg3.jpg);
background-repeat: no-repeat;
background-position:left bottom;}

最佳答案

如果您的文本是单行,则使用 line-height = height:

h3 {
height: 30px;
line-height: 30px;
display: inline-block;
}

关于html - 垂直对齐表格单元格中心的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25480949/

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