其他分享
首页 > 其他分享> > vscode修改背景

vscode修改背景

作者:互联网

  1. 进入vscode目录: VScode\resources\app\out\vs\code\electron-browser\workbench
  2. 新建css文件 index.css 并将样式写入
:root {
	--color: var(--notebook-inactive-focused-cell-border-color);
	--color-active: #23252c50;
	--color-hover: #abb2bf50;
	--color-menu: #3e445250;
	--color-widget: #3e445250;
}

body {
	position: relative;
	background: var(--colorr) !important;
}

/* 菜单颜色 */
.select-box-dropdown-list-container,
.monaco-menu-container div,
.quick-input-widget {
	background-color: var(--color-widget) !important;
}

body:after {
	content: "";
	/* 背景颜色透明成度 */
	opacity: 0.3;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	display: block;
	position: absolute;
	/* 背景图片 */
	background-image: url("1.png"); /* 路径 */
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
}

.part,
.margin,
.content,
.expanded,
.pane-header,
.editor-container,
.tabs,
.tab,
.scrollbar,
.monaco-editor,
.monaco-editor-background,
.monaco-select-box,
.monaco-inputbox,
.monaco-list-rows,
.monaco-workbench,
.monaco-breadcrumbs,
.xterm-viewport,
.suggest-input-container,
.terminal-outer-container,
.notifications-center-header,
.feedback-description,
.notification-toast,
.notifications-list-container,
.feedback-form {
	background-color: #ffffff00 !important;
}

.tab-actions-right {
	border-right: 1px solid #6c6c6ccf !important;
}

.scroll-decoration {
	box-shadow: #6c6c6ccf 0 3px 3px -3px inset !important;
}

/* 标题栏选中 */
.tab.active,
/* 文件列表高亮 */
.monaco-workbench .part.editor>.content .editor-group-container.active>.title .tabs-container>.tab:hover {
	background: var(--color-menu) !important;
}

/* 高亮处理 */
/* 代码选中高亮 */
.current-line,
/* 菜单选中颜色 */
.focused .action-menu-item,
.monaco-list-row.selected,
/* 按钮颜色 */
.monaco-text-button {
	background-color: var(--color-active) !important;
}

/* 跨行选择颜色 */
.selected-text,
/* 菜单高亮 */
.monaco-list-row:hover {
	background-color: var(--color-hover) !important;
}

iframe,
canvas,
textarea,
.context-view div,
.shadow-root-host {
	opacity: 0.9;
}

.shadow-root-host {
	position: relative;
	z-index: 1000;
}
  1. 修改 workbench.html 文件添加
<link rel="stylesheet" type="text/css" href="./index.css">

标签:container,vscode,背景,修改,important,background,monaco,--,color
来源: https://www.cnblogs.com/nate-pan/p/16378467.html