gpt4 book ai didi

css - 将文本居中对齐到div的底部

转载 作者:行者123 更新时间:2023-12-02 08:36:34 25 4
gpt4 key购买 nike

基本上,我在div的底部找到了我喜欢的文本,但是问题是它向左对齐,我希望它位于div的中心。

CSS3

#article-footer {
width: 100%;
margin: 0 auto;
}

#article-footer {
position: relative;
width: 70%;
float: left;
font-weight: bold;
font-size: 23px;
color: #354175;
}

#article-footer span{
position:absolute;
bottom: 0;
}

最佳答案

#article-footer span{
position:absolute;
bottom: 0;
left:50%;
margin-left:-50%;}

关于css - 将文本居中对齐到div的底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20689348/

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