csdn默认的代码背景色是浅色的,与浅色主题很容易混淆,不是很适合大量代码的阅读。
设置代码背景色为黑色深色的方法:
(1)登陆优快云账号,右上角,点击 " 创作中心 "。或者 选择账号头像, 点击 " 管理博客 "。
(2)点击进入左侧的 " 博客设置 " 界面,选择自己喜欢的 " 代码片样式 "
之后滑倒网页最下方,点击 " 保存 ",即可。
优快云默认的代码样式是 " atom-one-light ",是浅色背景。可以更改为 " atom-one-dark "、" tomorrow-night "、" Durcula " 这些深色背景。有很多可供选择。
atom-one-dark 的显示样例:
#include <iostream>
using namespace std;
int main() {
int usr=0;
cout << "请输入1、2、3其中一个数字" << endl;
cin >> usr;
switch (usr)
{
case 1:
cout << "输入了1" << endl; break;
case 2:
cout << "输入了2" << endl; break;
case 3:
cout << "输入了3" << endl; break;
default:
cout << "不在规定范围内输入" << endl; break;
}
system("pause");
return 0;
}
--------------------------------------------------------------
请输入1、2、3其中一个数字
3
输入了3
请按任意键继续. . .