gpt4 book ai didi

css - 页脚内容无法设置精确居中?

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

我尝试在底部中央设置引导页脚内容。但不幸的是 footer 没有设置准确的中心位置。我还没有弄清楚错误。请帮助我。

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<footer class="container text-center"; style="position:absolute; bottom:0px; ">
<p>This is my footer content</p>
</footer>

最佳答案

试试这段代码

html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>
<footer class="container text-center"; style="position:absolute; bottom:0px; width:100%; ">
<p>This is my footer content</p>
</footer>
</body>
</html>

关于css - 页脚内容无法设置精确居中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57353583/

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