-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTMLFlex.html
More file actions
59 lines (59 loc) · 1.45 KB
/
Copy pathHTMLFlex.html
File metadata and controls
59 lines (59 loc) · 1.45 KB
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
54
55
56
57
58
59
<!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>
<style>
.container{
background-color: lightgoldenrodyellow;
border: 4px solid green;
display: flex;
/* padding: 20px; */
justify-content: flex-start;
align-items: center;
/* height: 600px */
min-height: 400px;
flex-direction: row-reverse;
flex-wrap: wrap;
column-gap: 30px;
}
.item{
background-color: blueviolet;
border: 2px solid red;
width: 50px;
height: 50px;
padding: 10px;
display: flex;
justify-content: center;
text-align: center;
/* flex-shrink: 1;
flex-grow: 1; */
}
#i1{
/* flex-grow: 1;
flex-shrink: 5;
align-self: flex-start; */
margin-right: auto;
}
@media(max-width:400px){
.container{
flex-wrap: wrap;
background-color: green;
}
}
</style>
<body>
<div class="container"></div>
<div class="item" id="i1">Item 1</div>
<div class="item">Item 2</div>
<div class="item">Item 3</div>
<div class="item">Item 4</div>
<div class="item">Item 5</div>
<div class="item">Item 6</div>
<div class="item">Item 7</div>
<div class="item">Item 8</div>
<div class="item">Item 9</div>
</body>
</html>