< Back to Frontend Friday Folks Index
< Back to Frontend Friday Folks Index
Interleaved
Highlighted solution (480 characters)
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 | |
This is a straight forward solution using Flexbox. Even though you may see multiple rows, it's
easier to think of it all as one row, where the stalactites and stalagmites are aligned
differently.
Highlighted solution (486 characters)
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 | |
Since we first saw this as multiple rows, we wanted to try it as a grid as well. This solution
uses multiple row spans to achieve the height effect.
Highlighted solution (1157 characters)
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 | |
The animated version moves the background of the divs around to create the animation effect. So
instead of moving the containers around with their positioning, it uses
background-position
and background-size
to position the gradients in a
way they can move without "overflowing". The overflow effect can cause a part of the gradient to
appear on the other side of the container.Whenever I think of learning resources for Flexbox or Grid, I need to link to Flexbox Froggy and Grid Garden.