页脚固定于底部的方法
来源:互联网 发布:任子行网络 网吧上网 编辑:程序博客网 时间:2024/05/01 23:19
方法一:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style type="text/css">
body,html {
margin: 0;
padding: 0;
height:100%;
}
#main {
position: relative;
min-height:100%;
background:#eee;
}
#content {
padding: 10px;
padding-bottom: 100px;
}
#footer {
position: absolute;
bottom: 0;
height: 100px;
width: 100%;
background:lightblue;
}
</style>
</head>
<body>
<div id="main">
<div id="content">
<script type="text/javascript">
for(var i=0; i<400; i++){
document.write(i+'<br/>');
}
</script>
</div>
<div id="footer">
Footer
</div>
</div>
</body>
</html>
方法二:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>css实现页脚始终在最底部</title>
<style type="text/css">
* {padding: 0;margin: 0;}
html {*overflow: auto;}
body {_width: expression(this.parentNode.clientWidth);}
html,body {height: 100%;}
.section {min-height: 100%;_height: 100%;}
.footer {height: 60px;background: #000;margin-top: -60px;color: #FFF;}
</style>
</head>
<body>
<div class="section">
<script type="text/javascript">
for(var i=0; i<10; i++){
document.write(i+'<br/>');
}
</script>
</div>
<div class="footer">我是页脚</div>
</body>
</html>
方法三:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title></title>
<meta name="generator" content="editplus">
<meta name="author" content="Ariex">
<meta name="keywords" content="">
<meta name="description" content="">
<style type="text/css">
body{margin:0px;padding:0px;overflow:hidden;padding-top:22px;padding-bottom:22px;}
#header{background-color:blue;color:white;position:absolute;top:0px;left:0px;height:16px;width:100%;}
#content{background-color:yellow;width:100%;height:100%;overflow:auto}
#footer{background-color:green;color:white;width:100%;height:16px;position:absolute;bottom:0px;left:0px;}
</style>
<script language="javascript">
</script>
</head>
<body>
<div id="header">header</div>
<div id="content">
<script language="javascript">
for(i=0;i<1000;i++){
document.write(i+"
");
}
</script>
</div>
<div id="footer">footer</div>
</body>
</html>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title></title>
<meta name="generator" content="editplus">
<meta name="author" content="Ariex">
<meta name="keywords" content="">
<meta name="description" content="">
<style type="text/css">
body{margin:0px;padding:0px;overflow:hidden;padding-top:22px;padding-bottom:22px;}
#header{background-color:blue;color:white;position:absolute;top:0px;left:0px;height:16px;width:100%;}
#content{background-color:yellow;width:100%;height:100%;overflow:auto}
#footer{background-color:green;color:white;width:100%;height:16px;position:absolute;bottom:0px;left:0px;}
</style>
<script language="javascript">
</script>
</head>
<body>
<div id="header">header</div>
<div id="content">
<script language="javascript">
for(i=0;i<1000;i++){
document.write(i+"
");
}
</script>
</div>
<div id="footer">footer</div>
</body>
</html>
- 页脚固定于底部的方法
- 固定于底部的图片返回按钮
- 页脚固定页面底部
- css 页脚固定到底部
- footer固定底部-HTMLCSS方法
- Phonegap+Android固定头部和底部工具栏的方法
- 将footer固定在页面底部的实现方法
- footer固定在页面底部的几种方法
- 网页内容高度不够时,让footer处于页面底部的方法(不是固定在底部)
- 通过jQuery来实现页脚永远固定在页面底部的效果
- android实现上面的内容滚动,底部放置一固定的按钮的方法
- 底部固定附加层的显示
- banner固定在浏览器窗口的底部
- 将页脚固定在页面的底部
- HTML5 固定底部的footer功能栏
- 内容不足一屏时的footer固定底部
- 网页底部固定的两种方式
- 头部底部固定的另一种实现方式
- 关于上传android studio代码到github
- Android Service完全解析,关于服务你所需知道的一切(下)
- word中matlab的图片,转为pdf格式时失真如何解决?
- 如何在Android中添加系统服务
- C语言之尾队列tailq
- 页脚固定于底部的方法
- 使用selector自定义checkbox
- php命名空间详解
- powershell windows 网络设置
- 网上订餐系统1
- How Many Tables
- PopupWindow的简单使用
- 【Java学习笔记】进制转换
- ubuntu apache2配置