我正在努力为我正在开发的网站制作一个响应式页脚.即使页面内容仅占页面的一半,页脚也必须始终位于页面的结尾/底部.
我尝试过在这个例子中使用代码,但我无法使用它.
页脚不能是粘性的,它必须在滚动到页面底部之后显示在页面的所有内容之后,或者如果没有内容则必须位于页面的底部.
我有一个页脚和一个标题组件,它们显示在我的应用程序组件中.
我在代码笔上找到的这个例子对我不起作用,但这是我想要的确切行为.- https://codepen.io/anon/pen/OxJooY
<div class="demo">
<h1>CSS “Always on the bottom” Footer</h1>
<p>I often find myself designing a website where the footer must rest at the bottom of the page, even if the content above it is too short to push it to the bottom of the viewport naturally.</p>
<p>I often find myself designing a website where the footer must rest at the bottom of the page, even if the content above it is too short to push …Run Code Online (Sandbox Code Playgroud)