小编Sec*_*rus的帖子

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

基本上我在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;
}
Run Code Online (Sandbox Code Playgroud)

css alignment css3

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

alignment ×1

css ×1

css3 ×1