Skip to content

Commit 9f997b9

Browse files
张欧文张欧文
张欧文
authored and
张欧文
committed
start learning flex
1 parent 76e6c8b commit 9f997b9

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

starter/04-CSS-Layouts/flexbox.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
<style>
99
.el--1 {
1010
background-color: blueviolet;
11+
align-self: flex-start;
12+
order: 2;
1113
}
1214
.el--2 {
1315
background-color: orangered;
@@ -18,12 +20,14 @@
1820
}
1921
.el--4 {
2022
background-color: goldenrod;
23+
align-self: stretch;
2124
}
2225
.el--5 {
2326
background-color: palevioletred;
2427
}
2528
.el--6 {
2629
background-color: steelblue;
30+
order: -1;
2731
}
2832
.el--7 {
2933
background-color: yellow;
@@ -32,6 +36,9 @@
3236
background-color: crimson;
3337
}
3438

39+
.el {
40+
/* margin-right: 10px; */
41+
}
3542
.container {
3643
/* STARTER */
3744
font-family: sans-serif;
@@ -40,6 +47,10 @@
4047
margin: 40px;
4148

4249
/* FLEXBOX */
50+
display: flex;
51+
align-items: center;
52+
justify-content: flex-start;
53+
gap: 30px;
4354
}
4455
</style>
4556
</head>

starter/04-CSS-Layouts/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ <h1>📘 The Code Magazine</h1>
2525
<!-- <strong>This is the navigation</strong> -->
2626
<a href="blog.html">Blog</a>
2727
<a href="#">Challenges</a>
28-
<a href="#">Flexbox</a>
29-
<a href="#">CSS Grid</a>
28+
<a href="flexbox.html">Flexbox</a>
29+
<a href="css-grid.html">CSS Grid</a>
3030
</nav>
3131

3232
<!-- <div class="clear"></div> -->

0 commit comments

Comments
 (0)