-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.css
More file actions
115 lines (97 loc) · 2 KB
/
Copy pathmain.css
File metadata and controls
115 lines (97 loc) · 2 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#cards {
display: flex;
flex-wrap: wrap;
width: 85%;
/* 新增:寬度和標頭一致 */
margin: 0 auto;
/* 新增:置中 */
}
.card {
/* 卡片在容器裡的排版 */
flex: 7% 1 1; /* 每個 item 分配容器寬度 */ /* 修改:卡片需要分配剩餘空間 */
height: 8vw; /* 依視窗的寬度等比例變化 */
border: 2px solid #e0e0e0;
/* /flex-basis、flex-grow、flex-shrink/ */
/* 主要的寬度由 flex-basis 設定,剩下的 flex-grow 和 flex-shrink 是針對「空間有剩」或「空間不夠」等情況,設定元素如何縮放。 */
/* 卡片內部元素的排版 */
display: flex;
flex-direction: column;
/* main axis */
justify-content: space-around;
margin: 2px;/* 卡片邊距 */
box-sizing: border-box;
/* 設定 box-sizing*/
}
.card img{
max-width: 30%;
align-self:center;
}
.card p {
margin: 3px;
font-size:10px;
}
.card p:last-child {
transform: rotate(180deg);
}
.back {
background: url('https://assets-lighthouse.alphacamp.co/uploads/image/file/9222/ExportedContentImage_00.png');
background-size: cover;
}
.paired {
background-color: #dae0e3;
}
#header {
display: flex;
margin: 0 auto;
flex-direction: column;
align-items: flex-end;
width: 85%;
}
#header .title {
width: 100%;
display: flex;
justify-content: flex-end;
}
#header .title img {
max-width: 5em;
}
#header .title h2 {
padding-left: 0.5em;
}
#header .score {
margin: 0;
color: #6c90ac;
}
#header .tried {
margin-top: 0;
}
.wrong {
animation-name: wrongAnimation;
animation-duration: 0.2s;
animation-iteration-count: 5;
}
@keyframes wrongAnimation {
to {
border: 2px solid #ffd54f;
}
}
/** Game finished **/
.completed {
position: absolute;
z-index: 999;
top: 33vh;
background-color: RGBA(232, 246, 254, 0.8);
width: 100vw;
padding: 50px 0;
}
.completed>p {
font-size: 1.5em;
color: black;
text-align: center;
margin: 0;
}
.completed>p:first-child {
font-size: 3em;
font-weight: 700;
color: #758d9a;
}