-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcss
96 lines (83 loc) · 1.39 KB
/
css
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
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Arial, sans-serif;
}
header {
display: flex;
justify-content: space-between;
padding: 20px;
background-color: #333;
color: #fff;
}
.product-list {
display: flex;
flex-wrap: wrap;
padding: 20px;
gap: 20px;
}
.product {
border: 1px solid #ccc;
border-radius: 8px;
padding: 20px;
width: 100%;
max-width: 200px;
text-align: center;
}
.product img {
width: 100%;
height: auto;
border-radius: 8px;
}
button {
background-color: #333;
color: #fff;
padding: 10px;
border: none;
cursor: pointer;
border-radius: 5px;
}
button:hover {
background-color: #555;
}
/* Modal styling */
.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
.modal-content {
background-color: #fff;
margin: 15% auto;
padding: 20px;
width: 90%;
max-width: 500px;
border-radius: 8px;
}
.close {
float: right;
font-size: 20px;
cursor: pointer;
}
/* Responsive layout */
@media (min-width: 600px) {
.product-list {
justify-content: space-between;
}
.product {
width: calc(50% - 20px);
}
}
@media (min-width: 900px) {
.product {
width: calc(33.333% - 20px);
}
}