forked from GCA-Classroom/02-flexbox-playlist
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
98 lines (85 loc) · 1.42 KB
/
style.css
File metadata and controls
98 lines (85 loc) · 1.42 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/* Basic Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Open Sans', sans-serif;
background: #f4f4f4;
padding: 20px;
}
/* Header styling */
header {
text-align: center;
margin-bottom: 40px;
}
header h1 {
font-family: 'Montserrat', sans-serif;
font-size: 42px;
}
/* Album card styling */
.album {
position: relative;
width: 220px;
background: #fff;
border: 1px solid #ddd;
flex: 0 0 220px;
}
.album img {
width: 100%;
display: block;
}
.album:hover .overlay {
opacity: 1;
visibility: visible;
}
.info {
padding: 10px;
}
.info h3 {
font-family: 'Montserrat', sans-serif;
font-size: 16px;
margin-bottom: 5px;
}
.info p {
font-size: 14px;
color: #666;
}
.overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 12px;
background: rgba(0, 0, 0, 0.7);
color: #fff;
text-align: center;
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease, visibility 0.2s ease;
}
.container {
display: flex;
flex-wrap: nowrap;
gap: 20px;
overflow-x: auto;
justify-content: flex-start;
width: calc(4 * 220px + 3 * 20px);
max-width: 100%;
margin: 0 auto;
}
@media (max-width: 768px) {
.container {
flex-direction: column;
width: 100%;
overflow-x: visible;
align-items: center;
}
.album {
width: 100%;
max-width: 480px;
flex: 0 0 auto;
}
}