-
Notifications
You must be signed in to change notification settings - Fork 0
/
两列定宽作业.html
53 lines (52 loc) · 844 Bytes
/
两列定宽作业.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>两列定宽作业</title>
</head>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.parent{
position: relative;
right: 50%;
left: 50%;
transform:translate(-50%,0);
width: 810px;
color: white;
font: 28px "微软雅黑";
text-align: center;
margin-top: 40px;
}
.side{
float: left;
width: 200px;
background-color: #be0712;
height: 200px;
line-height: 175px;
}
.main{
float: right;
width: 600px;
background-color: #5182bb;
height: 200px;
line-height: 175px;
}
.clearfix:after{
content: ".";
display: block;
clear: both;
height: 0;
overflow: hidden;
visibility: hidden;
}
</style>
<body>
<div class="parent clearfix">
<div class="side">侧栏</div>
<div class="main">主栏</div>
</div>
</body>
</html>