-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
91 lines (84 loc) · 1.98 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
body {
font-family: 'Arial', sans-serif;
background-color: #f0f0f0;
color: #333;
margin: 0;
padding: 20px;
/* 保留一些内边距 */
text-align: center;
min-width: 400px;
/* 确保最小宽度,避免过窄 */
display: flex;
/* 使用 Flexbox 布局 */
justify-content: center;
/* 水平居中 */
align-items: center;
/* 垂直居中 */
min-height: 300px;
/* 确保最小高度,避免过高 */
}
.container {
background-color: white;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 30px;
/* 增加内边距以提高视觉效果 */
width: 100%;
/* 设置宽度为100% */
max-width: 500px;
/* 设置最大宽度为500px */
margin: 0 auto;
/* 自动外边距使其居中 */
box-sizing: border-box;
/* 确保内边距和边框被包含在宽度计算内 */
}
h1 {
font-size: 1.5em;
margin-bottom: 15px;
color: #4A90E2;
/* 深蓝色 */
}
button {
width: 100%;
/* 设置按钮宽度为100% */
background-color: #4A90E2;
/* 按钮颜色 */
color: white;
border: none;
border-radius: 5px;
padding: 10px;
/* 根据需要调整内边距 */
cursor: pointer;
font-size: 1em;
transition: background-color 0.3s;
}
button:hover {
background-color: #357ABD;
/* 鼠标悬停时的颜色 */
}
.quote {
min-height: 40px;
/* 固定最小高度 */
font-size: 1.2em;
/* 句子字体大小 */
margin: 10px 0;
/* 上下外边距 */
}
.author {
min-height: 20px;
/* 固定最小高度 */
font-size: 0.9em;
/* 作者字体大小 */
color: #888;
/* 使用淡灰色显示 */
margin: 5px 0;
/* 上下外边距 */
}
.footer {
margin-top: 20px;
/* 增加顶部外边距 */
font-size: 0.8em;
/* 设置字体大小 */
color: #666;
/* 使用较浅的颜色 */
}