【发布时间】:2018-03-25 03:56:03
【问题描述】:
不太清楚为什么粘性页脚在 Bootstrap 4 中不起作用。我有一个 TYPO3 网站,我是初学者。
粘性页脚没有粘在页面底部。
这里是页面源代码的副本,因为它已被渲染。
我基本上是从 bootstraps docs 文件夹中复制了 html 文件,然后对其进行了修改并将其复制到我的 TYPO3 模板中。
如果我用内容填充页面,页脚不会粘住 - 我必须向下滚动页面才能看到它。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Landing Page</title>
<meta name="generator" content="TYPO3 CMS">
<link rel="stylesheet" type="text/css"
href="/typo3temp/assets/css/d42b6e1bdf.css?1507853162" media="all">
<link rel="stylesheet" type="text/css"
href="/fileadmin/templates/landing_page/css/bootstrap.min.css?1507860230"
media="all">
<link rel="stylesheet" type="text/css"
href="/fileadmin/templates/landing_page/css/sticky-footer.css?1507861966"
media="all">
<script
src="/fileadmin/templates/landing_page/js/jquery-3.2.1.min.js?1507862465"
type="text/javascript"></script>
<script
src="/fileadmin/templates/landing_page/js/tether.min.js?1507862602"
type="text/javascript"></script>
<script
src="/fileadmin/templates/landing_page/js/bootstrap.min.js?1507854311"
type="text/javascript"></script>
</head>
<body>
<div class="container">
<div class="mt-1">
<h1>Sticky footer</h1>
</div>
<p class="lead">Pin a fixed-height footer to the bottom of the
viewport in desktop browsers with this custom HTML and CSS.</p>
<p>
Use <a href="../sticky-footer-navbar">the sticky footer with a
fixed navbar</a> if need be, too.
</p>
<div class="row">
<div class="col">1 of 3</div>
<div class="col">1 of 3</div>
<div class="col">1 of 3</div>
</div>
</div>
<footer class="footer">
<div class="container">
<span class="text-muted">Place sticky footer content here.</span>
</div>
</footer>
</body>
</html>
【问题讨论】:
-
请检查您的 CSS 文件路径...
-
@sajee 文件路径正确。我已经通过查看源代码进行了验证->然后单击每个以查看它是否加载了文本并且它们确实加载了。
-
当我检查您提供的 conde sn-p 时,没有任何样式应用于 HTML 内容。
标签: html css typo3 bootstrap-4 sticky-footer