-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnake.css
More file actions
104 lines (96 loc) · 2.83 KB
/
Copy pathsnake.css
File metadata and controls
104 lines (96 loc) · 2.83 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
body {
text-align: center;
background-image: url(./source/BG_Snake.jpg);
background-size: cover;
}
.gameCanvas {
display: block;
margin: 0 auto;
background-color: #f2f2f2; /* 棋盘背景颜色 */
border: 3px solid gold; /* 外边框 */
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); /* 阴影效果 */
}
#scoreBoard {
font-size: 20px;
font-weight: bold;
color: #000;
background: linear-gradient(to right, #f9f9f9, #e0e0e0);
padding: 5px;
border-radius: 5px;
text-align: center; /* 让文本居中 */
border: 2px solid #444;
transition-duration: 0.4s;
cursor: default;
margin: 10px auto; /* 上下设置10px的外边距,并且自动设置左右外边距 */
width: 150px;
}
.sstyle {
font-size: 20px; /* 设置字体大小 */
font-weight: bold; /* 设置字体粗细 */
color: #000; /* 设置字体颜色 */
background: linear-gradient(to right, #f9f9f9, #e0e0e0); /* 渐变背景色 */
padding: 5px; /* 设置内边距 */
border-radius: 5px; /* 设置边框圆角 */
text-align: center; /* 设置文本对齐方式 */
border: 2px solid #444; /* 边框 */
transition-duration: 0.4s; /* 设置过渡效果 */
cursor: default; /*设置鼠标样式 */
margin: 0 10px; /* 设置按钮间距 */
width: 100px; /* 设置宽度 */
}
button {
font-size: 20px; /* 设置字体大小 */
font-weight: bold; /* 设置字体粗细 */
color: #000; /* 设置字体颜色 */
background: linear-gradient(to right, #f9f9f9, #e0e0e0); /* 渐变背景色 */
padding: 5px; /* 设置内边距 */
border-radius: 5px; /* 设置边框圆角 */
text-align: center; /* 设置文本对齐方式 */
border: 2px solid #444; /* 边框 */
transition-duration: 0.4s; /* 设置过渡效果 */
cursor: pointer; /* 设置鼠标样式 */
margin: 0 10px; /* 设置按钮间距 */
width: 100px; /* 设置宽度 */
}
.button-container {
display: flex; /* 设置为 flex 容器 */
justify-content: center; /* 水平居中对齐 */
}
button:hover {
background: linear-gradient(to right, #636060, #777676); /* 鼠标悬停时的渐变背景色 */
}
#instructionsButton {
position: absolute;
top: 10px;
right: 10px;
width:100px;
/* 其他样式... */
}
#instructions {
text-align:justify;
width: 200px;
height: 550px;
position: absolute;
top: 60px;
right: 10px;
display: none;
border: 2px solid #ccc; /* 边框样式 */
padding: 5px; /* 边框内边距 */
background-color: #f2f2f2; /* 背景色 */
overflow-y: auto; /* 添加滚动条 */
}
footer #author{
position: fixed;
left: 10px;
bottom: 10px;
font-size: 20px;
color: #888;
left: 0;
}
footer #version{
position: fixed;
right: 10px;
bottom: 10px;
font-size: 20px;
color: #888;
}