-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
137 lines (110 loc) · 2.52 KB
/
styles.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
.header {
display: flex;
align-items: center;
justify-content: center;
/* margin-top: 5px; */
margin-bottom: 5px;
}
.avatar {
width: 70px;
height: 70px;
border-radius: 15%;
/* /* margin-left: 50px; */
margin-right: 100px;
margin-bottom: 3px; /* 调整头像与文字之间的间距 */
}
* {
margin: 0px;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
background-color: #222;
display: flex;
margin: 0 auto;
overflow-y: auto;
min-height: 100vh; /* 确保内容最小高度为视口高度 */
align-items: center;
justify-content: center;
/* padding-top: 20px; 可根据需要调整填充以避免遮挡顶部 */
}
.container {
max-width: 560px;
margin: 0 auto; /* 自动水平居中 */
padding: 5px;
background-color: #333;
border-radius: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
color: #a4a8a2;
text-align: center;
}
h1 {
margin: 0; /* 去除默认的 margin */
color: #eddcdc;
font-size: 32px; /* 适当调整字体大小 */
}
.game-link {
margin-bottom: 5px;
}
.game-link a {
text-decoration: none;
color: #fff; /* 超链接颜色保持一致 */
}
.game-link img {
width: 95%;
/* max-width: 550px; 与游戏中 #game-board 的最大宽度一致 */
height: auto;
border-radius: 50px;
transition: transform 0.3s ease;
}
.game-link img:hover {
transform: scale(1.02); /* 图片悬停时放大效果 */
}
h2 {
margin:0;
color: #63d66d; /* 与贪吃蛇的颜色一致 */
margin-top: 4px;
margin-bottom: 10px;
font-size: 20px; /* You can adjust the size as needed */
}
p {
color: #a8a2a2;
font-size: 14px;
margin-top: 2px;
margin-bottom: 10px;
}
/* 响应式布局 */
@media (max-width: 600px) {
.header {
margin-bottom: 1vw;
}
.avatar {
width: 10vw;
height: 10vw;
margin-right: 10vw;
margin-bottom: 0.5vw;
}
body {
padding-top: 1vw;
}
.container {
padding: 1vw;
}
h1 {
font-size: 5vw;
}
.game-link {
margin-bottom: 0vw;
}
h2 {
font-size: 3.5vw;
margin-top: 0.5vw;
margin-bottom: 1vw;
}
p {
font-size: 2vw;
margin-top: 1vw;
margin-bottom: 1vw;
}
}