-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy path弹性布局.html
48 lines (41 loc) · 1018 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<!-- 使用弹性盒模型可以让元素在不同尺寸终端控制尺寸 -->
<body>
<style>
* {
padding: 0;
margin: 0;
}
body {
width: 1970px;
height: 1080px;
}
.container {
display: flex;
width: 100%;
height: 100%;
justify-content: space-evenly;
}
.container .left {
border: 1px solid #ddd;
min-width: 80px;
background-color: red;
}
.container .right {
border: 1px solid #ddd;
flex: 1;
background-color: blue;
}
</style>
<div class="container">
<div class="left"></div>
<div class="right"></div>
</div>
</body>
</html>