新增第三篇文字

This commit is contained in:
wolegca 2019-12-29 16:11:28 +08:00
parent 0a1f007c7c
commit 5a9a7d44b0
2 changed files with 17 additions and 0 deletions

View File

@ -8,5 +8,10 @@
"title": "笔记2让新版Chrome支持本地跨域请求调试",
"date": "2019-09-20$1",
"hasCode": false
},
{
"title":"笔记3console下文字颜色的实现",
"date":"2019-12-29$1",
"hasCode": false
}
]

View File

@ -0,0 +1,12 @@
<span>console下文字颜色的实现</span>
<p>程序在console下输出的文字一般默认是白色或者是其他用户自定义的统一颜色</p>
<img src="" alt="截图1">
<p>改变文字的颜色一般要用到颜色转义字符\e或者是\033,如</p>
<pre>
<code>
typedef enum colors
{
"<span style="color:blue">\e</span>[0;31;32m<span style="color:yellow">%s</span><span style="color:blue">\e</span>[0m"
} colors;
</code>
</pre>