diff --git a/content.json b/content.json index 151dab5..09ee375 100644 --- a/content.json +++ b/content.json @@ -8,5 +8,10 @@ "title": "笔记2:让新版Chrome支持本地跨域请求调试", "date": "2019-09-20$1", "hasCode": false + }, + { + "title":"笔记3:console下文字颜色的实现", + "date":"2019-12-29$1", + "hasCode": false } ] \ No newline at end of file diff --git a/content/html/2019-12-29$1.html b/content/html/2019-12-29$1.html new file mode 100644 index 0000000..387adda --- /dev/null +++ b/content/html/2019-12-29$1.html @@ -0,0 +1,12 @@ +console下文字颜色的实现 +

程序在console下输出的文字一般默认是白色或者是其他用户自定义的统一颜色

+截图1 +

改变文字的颜色一般要用到颜色转义字符\e或者是\033,如

+
+	
+			typedef enum colors
+			{
+				"\e[0;31;32m%s\e[0m"
+			} colors;
+	
+
\ No newline at end of file