-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
80 lines (72 loc) · 1.67 KB
/
index.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html>
<head>
<title>CSS Grid vs Flexbox</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #1f1f1f;
color: #ffffff;
margin: 0;
padding: 20px;
}
h1,
h2 {
margin-top: 0;
}
.grid-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
grid-gap: 20px;
margin-bottom: 20px;
}
.grid-item {
background-color: #ff007f;
border: 1px solid #ffffff;
text-align: center;
padding: 30px;
font-size: 24px;
letter-spacing: 1px;
}
.flex-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}
.flex-item {
background-color: #9b4dca;
border: 1px solid #ffffff;
text-align: center;
padding: 30px;
font-size: 24px;
letter-spacing: 1px;
margin: 10px;
}
</style>
</head>
<body>
<h1>CSS Grid vs Flexbox</h1>
<h2>CSS Grid</h2>
<div class="grid-container">
<div class="grid-item">We've</div>
<div class="grid-item">Known</div>
<div class="grid-item">Each</div>
<div class="grid-item">Other</div>
<div class="grid-item">For</div>
<div class="grid-item">So</div>
<div class="grid-item">Long</div>
</div>
<h2>Flexbox</h2>
<div class="flex-container">
<div class="flex-item">We</div>
<div class="flex-item">Both</div>
<div class="flex-item">Know</div>
<div class="flex-item">What's</div>
<div class="flex-item">Been</div>
<div class="flex-item">Going</div>
<div class="flex-item">On</div>
</div>
</body>
</html>