子页眉和段落元素不会留在粘性页脚和更好的页脚实现中吗?

问题描述

我目前正在尝试将页脚元素的内容保留在内部并居中。但是,他们没有待在里面。我还希望它能够响应移动设备,因此无论页脚大小如何,它们都可以保留在页脚中。

还有,有没有更好的方法可以实现始终位于中间内容下方的移动响应页脚?

这是我当前的代码:

<body>
  <header>
    <h1>To-Do List</h1>
  </header>
  <form>
    <input type="text" class ="todo-input">
    <button class="todo-button" type="submit">
      <i class="fas fa-plus-square"></i>
    </button>
    <div class="select">
      <select name="todos" class="filter-todo"  >
        <option value="all">All</option>
        <option value="completed">Completed</option>
        <option value="uncompleted">Uncompleted</option>
      </select>
    </div>
  </form>
  <div class="todo-container">
    <ul class="todo-list">

    </ul>

  </div>
  <script src="apps.js"></script>
</body>
enter code here
/* Footer Styling */

footer{
    width:100vw;
    height: 5%;
    background-color:#FFF6E3;
    position:absolute;
    bottom:0;
    text-align:center;

}

footer h3 {
    margin-top: 2%;
    font-family: Helvetica;
    font-style: normal;
    font-weight: bold;
    font-size: 31px;
    line-height: 36px;
    color: #BB7720;
}

footer p,a {
    font-family: Baskerville;
    font-style: italic;
    font-weight: normal;
    font-size: 31px;
    text-align: right;
    letter-spacing: 0.07em;
    text-align:center;
    color: #946E29;
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)