日期:2014-05-17  浏览次数:20742 次

CSS如何让页码在距离底部5个高度地方显示?
页面中的内容条数有由数据库中读取出来,所以条数不固定。
但是只想在固定的底部显示页码怎么用css做?
例如:
1 XXXX CCCC
2 yyyy bbbb
3 XXXX CCCC
4 yyyy bbbb
5 XXXX CCCC
6 yyyy bbbb
7 XXXX CCCC
8 yyyy bbbb
  page1
1 XXXX CCCC
2 yyyy bbbb
3 XXXX CCCC





  page2
css

------解决方案--------------------
参考
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
html, body, #wrapper {
margin: 0;
width: 100%;
height: 100%;
}
.footer {
background:#000000;
text-indent:-9999px;
width:100%;
padding:5px 0;
height:24px;
margin:-50px 0 0 0;
position:fixed;
}
</style>
</head>
<body>
<div id="wrapper">
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p>xxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
</div>
<div class="footer" id="footer">
<p>ffffffffffffffffffff</p>
</div>
</body>
</html>