-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColorSetting.html
More file actions
301 lines (259 loc) · 7.65 KB
/
Copy pathColorSetting.html
File metadata and controls
301 lines (259 loc) · 7.65 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>彩色Markdown引用块</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
line-height: 1.6;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #f5f5f5;
}
.container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #333;
text-align: center;
margin-bottom: 30px;
}
h2 {
color: #555;
margin-top: 30px;
margin-bottom: 15px;
}
/* 提示样式 - 蓝色 */
.quote-tip {
background-color: #e8f4fd;
border-left: 4px solid #3498db;
padding: 15px 20px;
margin: 15px 0;
border-radius: 0 6px 6px 0;
position: relative;
}
.quote-tip::before {
content: "✏️ 提示";
font-weight: bold;
color: #2980b9;
display: block;
margin-bottom: 8px;
font-size: 14px;
}
/* 成功样式 - 绿色 */
.quote-success {
background-color: #d4edda;
border-left: 4px solid #28a745;
padding: 15px 20px;
margin: 15px 0;
border-radius: 0 6px 6px 0;
position: relative;
}
.quote-success::before {
content: "✅ 成功";
font-weight: bold;
color: #155724;
display: block;
margin-bottom: 8px;
font-size: 14px;
}
/* 警告样式 - 橙色 */
.quote-warning {
background-color: #fff3cd;
border-left: 4px solid #ffc107;
padding: 15px 20px;
margin: 15px 0;
border-radius: 0 6px 6px 0;
position: relative;
}
.quote-warning::before {
content: "⚠️ 警告";
font-weight: bold;
color: #856404;
display: block;
margin-bottom: 8px;
font-size: 14px;
}
/* 错误样式 - 红色 */
.quote-error {
background-color: #f8d7da;
border-left: 4px solid #dc3545;
padding: 15px 20px;
margin: 15px 0;
border-radius: 0 6px 6px 0;
position: relative;
}
.quote-error::before {
content: "❌ 错误";
font-weight: bold;
color: #721c24;
display: block;
margin-bottom: 8px;
font-size: 14px;
}
/* 信息样式 - 紫色 */
.quote-info {
background-color: #e2e3ff;
border-left: 4px solid #6f42c1;
padding: 15px 20px;
margin: 15px 0;
border-radius: 0 6px 6px 0;
position: relative;
}
.quote-info::before {
content: "ℹ️ 信息";
font-weight: bold;
color: #4c2c92;
display: block;
margin-bottom: 8px;
font-size: 14px;
}
code {
background-color: #f8f9fa;
padding: 2px 6px;
border-radius: 3px;
font-family: 'Courier New', monospace;
color: #e83e8c;
font-size: 0.9em;
}
.code-block {
background-color: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 6px;
padding: 15px;
margin: 15px 0;
overflow-x: auto;
}
.code-block pre {
margin: 0;
font-family: 'Courier New', monospace;
font-size: 14px;
line-height: 1.4;
}
.usage-example {
background-color: #f8f9fa;
border: 2px dashed #6c757d;
padding: 20px;
margin: 20px 0;
border-radius: 8px;
}
.usage-example h3 {
margin-top: 0;
color: #495057;
}
</style>
</head>
<body>
<div class="container">
<h1>彩色Markdown引用块实现方法</h1>
<h2>效果展示</h2>
<div class="quote-tip">
用 <code>yum</code> 命令也可以快速部署 <code>nginx</code>,如 <code>yum install nginx -y</code>
</div>
<div class="quote-success">
如果出现 <code>complete</code> 则表示执行成功!
</div>
<div class="quote-warning">
在不知道 <code>rebase</code> 指令是什么意思时,请不要轻易执行:<code>git rebase</code>
</div>
<div class="quote-error">
网络连接失败,请检查您的网络设置后重试。
</div>
<div class="quote-info">
这是一条信息提示,用于向用户说明某些重要信息。
</div>
<h2>CSS 实现代码</h2>
<div class="code-block">
<pre>/* 提示样式 - 蓝色 */
.quote-tip {
background-color: #e8f4fd;
border-left: 4px solid #3498db;
padding: 15px 20px;
margin: 15px 0;
border-radius: 0 6px 6px 0;
}
.quote-tip::before {
content: "✏️ 提示";
font-weight: bold;
color: #2980b9;
display: block;
margin-bottom: 8px;
}
/* 成功样式 - 绿色 */
.quote-success {
background-color: #d4edda;
border-left: 4px solid #28a745;
padding: 15px 20px;
margin: 15px 0;
border-radius: 0 6px 6px 0;
}
.quote-success::before {
content: "✅ 成功";
font-weight: bold;
color: #155724;
display: block;
margin-bottom: 8px;
}
/* 警告样式 - 橙色 */
.quote-warning {
background-color: #fff3cd;
border-left: 4px solid #ffc107;
padding: 15px 20px;
margin: 15px 0;
border-radius: 0 6px 6px 0;
}
.quote-warning::before {
content: "⚠️ 警告";
font-weight: bold;
color: #856404;
display: block;
margin-bottom: 8px;
}</pre>
</div>
<h2>HTML 使用方法</h2>
<div class="usage-example">
<h3>基本用法:</h3>
<div class="code-block">
<pre><div class="quote-tip">
这是一个提示信息
</div>
<div class="quote-success">
这是一个成功信息
</div>
<div class="quote-warning">
这是一个警告信息
</div></pre>
</div>
</div>
<h2>Markdown扩展语法(某些平台支持)</h2>
<div class="usage-example">
<h3>如果你的Markdown解析器支持自定义CSS类:</h3>
<div class="code-block">
<pre>> [!TIP]
> 这是一个提示信息
> [!SUCCESS]
> 这是一个成功信息
> [!WARNING]
> 这是一个警告信息</pre>
</div>
<p><strong>注意:</strong>这种语法在GitHub、GitLab、Typora等平台有不同程度的支持。</p>
</div>
<h2>在不同平台的使用建议</h2>
<div class="quote-info">
<strong>网站/博客:</strong>直接使用HTML + CSS的方式<br>
<strong>GitHub:</strong>使用 <code>> [!NOTE]</code> 等语法<br>
<strong>Typora:</strong>支持主题自定义引用样式<br>
<strong>Notion:</strong>有内置的彩色引用块功能
</div>
<div class="quote-tip">
你可以根据自己的需求调整颜色、图标和样式,创建更符合你项目风格的引用块。🙂
</div>
</div>
</body>
</html>