时无痕 2015-07-03 15:47 采纳率: 100%
浏览 1758
已采纳

求助,请问hearer前面的nofooter有什么作用?

<!DOCTYPE html>
 <html lang="en">
 <head>
 <meta charset="UTF-8">
 <title>代码管理系统</title>
 <link rel="stylesheet" href="css/style.css"/>
 <link rel="stylesheet" href="css/icon.css"/>
 <script src="js/jquery-1.10.1.js"></script>
 <script src="js/icon.js"></script>
 <script src="js/sc-js.js"></script>
 </head>
 <body>
 <div id="wapper">
 <div id="nofooter">
 <div id="header">
 <div id="header-content">
 <div class="logo"><a href="#"><img src="img/logo.png"/></a></div>
 <div class="header-title">
 <a href="#">
 <h1><span class="green">代码</span>管理系统</h1>
 <h4><i>Sample Code Manage System</i></h4>
 </a>
 </div>
 <div id="login-bar">
 <div id="login-msg">
 <span class="icon-cancel-circle light_pink"></span>
 <span class="light_pink"> 用户名不可为空!</span>
 </div>
 <form action="#">
 <!-- <label class="white">用户名:</label> --><input type="text" name="username" placeholder="用户名"/>
 <!-- <label class="white">密码:</label> --><input type="password" name="password" placeholder="密码"/>
 <a class="submit_btn" href="#"><span class="icon-enter"></span> 登录</a><a class="normal_btn" href="register.html"><span class="icon-user3"></span> 注册</a>
 </form>
 </div>
 </div>
 </div>
 <div id="content">
 <div id="side">
 <ul>
 <li><a href="index.html"><span class="icon-download"></span> 代码下载</a></li>
 <li><a href="admin.html"><span class="icon-profile"></span> 代码管理</a></li>
 <li><a href="upload.html"><span class="icon-upload"></span> 代码上传</a></li>
 </ul>
 </div>
 <div id="main">
 <div class="main_error">
 <span class="icon-sad"></span><br/><br/>
 <h1>请求的资源未找到!</h1>
 </div>
 </div>
 </div>
 </div>
 <div id="footer">
 <h4>&copy;2014 antonio_xie@163.com Copy Right Reserved</h4>
 </div>
 </div>
 </body>
 </html>
 >
 css文件(关键部分):
 #nofooter{padding-bottom: 70px;  /* 不至被footer盖住 */}


请问hearer前面的nofooter有什么作用?为什么说如果不加padding-bottom: 70px就会被盖住?

  • 写回答

3条回答

  • Go 旅城通票 2015-07-04 06:02
    关注

    foot和内容也分开罗。。。结构就是下面这种。。目测你的总容器wapper是relative定位,footer是absolute定位在最下面,而且高度是70,增加padding-bottom就是为了容纳70px高度的fotter,自己用开发工具看下dom结构和作用的css不就清楚了

     <div id="nofooter">
    </div>
    <div id="footer">
    </div>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 Qt下使用tcp获取数据的详细操作
  • ¥15 idea右下角设置编码是灰色的
  • ¥15 全志H618ROM新增分区
  • ¥20 jupyter保存图像功能的实现
  • ¥15 在grasshopper里DrawViewportWires更改预览后,禁用电池仍然显示
  • ¥15 NAO机器人的录音程序保存问题
  • ¥15 C#读写EXCEL文件,不同编译
  • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
  • ¥15 扩散模型sd.webui使用时报错“Nonetype”
  • ¥15 stm32流水灯+呼吸灯+外部中断按键