-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.css
63 lines (56 loc) · 1.24 KB
/
index.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
:root {
--red: rgb(216, 56, 56)
}
html {
height: 100%;
}
body {
min-height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
box-sizing: border-box;
background-color: rgb(229, 215, 190);
font-family: 'Patua One', cursive;
}
h1 {
margin-top: 0;
font-size: 3em;
color: var(--red);
}
#game img {
width: 100%;
height: 100%;
}
.card {
background-color: rgb(213, 151, 135);
border-radius: 15px;
box-shadow: 2px 3px 4px rgb(0 0 0 / 30%);
cursor: pointer;
}
.card img {
opacity: 0;
border-radius: 15px;
}
/*
Add styles as necessary to accomplish the following:
1. The elements inside the div with id 'game' must be displayed in a grid of three rows and three columns, each 128px wide/tall. The grid must have a gap of 16px.
*/
#game {
display: grid;
grid-template-columns: repeat(3, 128px);
grid-template-rows: repeat(3, 128px);
gap: 16px;
}
/*
2. Each image must transition from opacity: 0 to opacity: 1 on hover using any duration and timing function of your choice
*/
.img {
opacity: 0;
transition: opacity 0.5s ease-in-out;
}
img:hover {
opacity: 1;
transition: opacity 0.5s ease-in-out;
}