-
Notifications
You must be signed in to change notification settings - Fork 0
/
css定位到最下面.html
36 lines (36 loc) · 725 Bytes
/
css定位到最下面.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<style type="text/css">
*{margin:0;padding: 0;box-sizing: border-box;color:#fff;}
html,body{
height: 100%;
}
.header,.footer,.content{
height: 100px;width: 100%;background: #666;text-align:center;line-height: 100px;
}
.content{
height: 600px;background: #ffb500;
}
.footer{
margin-top: -100px;
}
</style>
</head>
<body>
<div style="min-height:100%;padding-bottom:100px;">
<div class="header">
header
</div>
<div class="content">
content
</div>
</div>
<div class="footer">
footer
</div>
</body>
</html>