-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfood.css
78 lines (78 loc) · 1.26 KB
/
food.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
* {
margin: 0;
padding: 0;
font-family: sans-serif;
box-sizing: border-box;
}
h1 {
text-align: center;
color: yellowgreen;
padding: 20px;
}
nav {
background-color: lime;
display: grid;
place-items: center;
}
nav ul {
list-style-type: none;
}
nav ul a {
display: inline-block;
padding: 20px;
text-decoration: none;
color: #000;
transition: 0.2s ease-in;
font-size: 18px;
}
nav ul a:hover {
background-color: green;
color: white;
}
.items {
display: grid;
grid-template-columns: repeat(3, 1fr);
padding: 30px 20px;
grid-column-gap: 20px;
grid-row-gap: 30px;
}
.item img {
width: 100%;
height: 300px;
object-fit: cover;
cursor: pointer;
transition: 0.2s ease;
}
.item img:hover {
transform: scale(1.04);
}
.item h2 {
padding: 5px;
text-align: center;
}
.item button {
padding: 5px 30px;
border: none;
outline: none;
background-color: green;
color: white;
cursor: pointer;
border-radius: 4px;
font-size: 20px;
display: block;
margin: 0 auto;
transition: 0.2s all;
}
.item button:hover {
transform: scale(1.08);
}
@media screen and (max-width: 1000px) {
.item {
grid-template-columns: repeat(2, 1fr);
}
}
@media screen and (max-width: 768px) {
.item {
grid-template-columns: repeat(1, 1fr);
}
}