您的位置:首页 > 其它

网页底部固定版权信息

2017-11-08 16:18 239 查看
首先编辑网页代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>测试例子</title>
</head>
<body>
<div id="footer">CopyRight@copy2017 </div>
</body>
</html>

添加style样式
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>测试例子/title>
<style type="text/css">
body {
padding: 0;
margin: 0 auto;
}

#footer {
height: 40px;
line-height: 40px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
background: #333;
color: #fff;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
}

.content {
height: 1800px;
width: 100%;
text-align: center;
}
</style>
</head>
<body>
<div id="footer">CopyRight@copy2017 </div>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: