/
week7-1-2.html
42 lines (35 loc) · 982 Bytes
/
week7-1-2.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Week 7-1-2</title>
<!-- week 6-3 -->
<!-- flex-direction: column; row row-reverse
flex-direction: row-reverse;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center; -->
<!--
align-content
•align-self -->
<style type="text/css">
div{display: flex; border: 1px solid;
width: 500px;height:400px;
/*flex-wrap: wrap;
align-content: center;
justify-content: center;*/ /*//make sure align content and justify content must be in multiple line so that flex wrap can work*/
}
p{width:200px;height: 100px;
background-color: cyan;
border: 1px solid;
box-sizing: border-box;} /*//will insure all the sizing attributes to be 1 by 1*/
p:nth-child(odd){align-self: center;}
</style>
</head>
<body>
<div>
<p>1</p><p>2</p><p>3</p><p>4</p>
</div>
</body>
</html>