gpt4 book ai didi

html - 水平对齐底部和居中?

转载 作者:太空宇宙 更新时间:2023-11-03 20:14:10 25 4
gpt4 key购买 nike

我有一个模式,我希望页码位于模式的底部并居中对齐。

页码绝对定位,底部为 0,居中对齐,文本对齐:

#pagination{

background: blue;
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
}

问题是,我将页码设置为 100% 宽度(因此它们可以居中对齐)但这考虑到了模态填充(我无法更改它),因此页码刚好偏离中心并且离开页面。

Fiddle

最佳答案

尝试将 left:0; 添加到您的代码中

#pagination {
background: none repeat scroll 0 0 blue;
bottom: 0;
left: 0;/*add this*/
position: absolute;
width: 100%;
}

关于html - 水平对齐底部和居中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24756204/

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