首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >当我调整浏览器窗口大小时,我的页脚会跳到文本上

当我调整浏览器窗口大小时,我的页脚会跳到文本上
EN

Stack Overflow用户
提问于 2019-05-27 01:14:45
回答 1查看 0关注 0票数 0

好的,所以我左边有一个段落,屏幕右边有一个图像,我的网页下面有一个页脚。因此,每当我调整浏览器窗口的大小时,图像就会如预期的那样低于段落,但随后突然页脚会跳起并覆盖段落。我该如何解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2019-05-27 10:28:22

代码语言:javascript
复制
<html>
<style>
   #page-container {
   position: relative;
   min-height: 100vh;
  }
  #content-wrap {
  padding-bottom: 2.5rem;    /* Footer height */
  }
  #footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 2.5rem;            /* Footer height */
 }
 </style>
 <body>
 <div id="page-container">
 <div id="content-wrap">
 <!-- all other page content -->
 </div>
  <footer id="footer"></footer>
 </div>
 </body>
 </html>
 To set footers on the bottom.
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100006807

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档