-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
111 lines (92 loc) · 2.68 KB
/
styles.css
File metadata and controls
111 lines (92 loc) · 2.68 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
/* styles.css */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background: url('gud.png') no-repeat center center fixed; /* 天空背景图片 */
background-size: cover;
height: 100vh;
/* display: flex;
justify-content: center;
align-items: center; */
}
.chapter-box, .section-box {
background-color: rgba(255, 255, 255, 0.7); /* 设置半透明背景 */
padding: 20px;
border: 1px solid #ddd;
border-radius: 8px;
text-align: center;
transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
cursor: pointer;
opacity: 0.8; /* 初始透明度 */
margin-bottom: 20px;
}
.note-container {
width: 80%; /* 使内容占据 80% 的宽度 */
max-width: 900px; /* 最大宽度 */
background-color: rgba(255, 255, 255, 0.85); /* 半透明白色背景 */
padding: 20px;
border-radius: 10px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
margin: 0 auto; /* 水平居中 */
/* overflow-y: auto;
max-height: 80vh; 最大高度,防止内容过长 */
}
.note-content {
color: #333;
line-height: 1.6;
}
/* 添加一个容器的 margin-bottom,以防止页面底部内容被切断 */
.note-container {
margin-bottom: 40px;
}
@media (max-width: 768px) {
.note-container {
width: 90%; /* 在小屏幕上更窄的宽度 */
}
}
.container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
}
.lesson-box {
background-color: rgba(255, 255, 255, 0.7); /* 设置半透明背景 */
padding: 20px;
border: 1px solid #ddd;
border-radius: 8px;
text-align: center;
transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
cursor: pointer;
opacity: 0.8; /* 初始透明度 */
margin-bottom: 20px;
}
.lesson-box h2 {
margin: 0;
font-size: 1.5em;
}
.lesson-box p {
color: #666;
}
.lesson-box:hover, .chapter-box:hover, .section-box:hover {
transform: scale(1.05);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
opacity: 1; /* 悬停时不透明 */
}
/* 自定义滚动条 */
::-webkit-scrollbar {
width: 12px; /* 滚动条的宽度 */
}
::-webkit-scrollbar-track {
background: transparent; /* 滚动条背景设置为透明 */
}
::-webkit-scrollbar-thumb {
background: rgba(100, 100, 100, 0.3); /* 滚动条把手默认设置为半透明 */
border-radius: 10px; /* 设置圆角 */
}
::-webkit-scrollbar-thumb:hover {
background: rgba(100, 100, 100, 0.6); /* 滚动条把手在鼠标悬停时变得更明显 */
}
::-webkit-scrollbar-thumb:active {
background: rgba(100, 100, 100, 0.8); /* 滚动条把手在点击时变得更加明显 */
}