首页 > 开发 > CSS > 正文

CSS3网页布局实例代码:始终在网页底部代码2则

2024-07-11 09:01:40
字体:
来源:转载
供稿:网友

武林网(www.vevb.com)文章简介:CSS3网页布局实例代码:始终在网页底部代码2则

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>始终在底部(1)</title>
<style>
body{margin:0}
html, body{height:100%}
.wrapper{min-height:100%;_height:100%;margin: 0 auto -100px}
.footer{height:100px;background:#ccc}
.push{height:100px}
</style>
</head>
<body>
<div class="wrapper">
    <p>始终在底部(1)</p>
    <div class="push"></div>
</div>
<div class="footer">版权文字</div> 
</body>
</html>

 

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>始终在底部(2)</title>
<style>
body{margin:0}
html, body{height:100%}
.wrapper{min-height:100%;_height:100%;margin: 0 auto -100px}
.footer{height:100px;background:#ccc}
.push{height:100px}
</style>
</head>
<body>
<div class="wrapper">
    <p>始终在底部(2)</p>
    <div class="push"></div>
</div>
<div class="footer">版权文字</div> 
</body>
</html>&#229;

 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表