修改背景 #

注意

下面的一些 CSS 样式只适用于最近的 Typora 版本(在 macOS 上>=0.9.9.6,而在 Windows 上>=0.9.13)。

提示

要知道把这些 CSS 片段放在哪里,请看 Add Custom CSS (opens new window)

就个人而言,我不建议用户为文本编辑器设置背景,但如果你仍然想这样做,这里要做的是:

例如,为 Typora 添加一个笔记本背景。(这个免费的图片取自 Fuzzimo (opens new window) ,并被复制到 Typora 的主题文件夹下)。

使用 CSS 代码:

content {
  background: url(./fzm-seamless.notebook.texture-14.png);
  background-repeat: repeat;
}

#write {
  padding-left: 120px; /*adjust writing area position*/
}

body {
  background: #F3F3F3;
  /*Please set this background color as close to the background image as possible.
  titlebar for seamless window on macOS will use this background color.
  typora for Win/Linux will use this to judge whether typora is in dark mode or light mode*/
}

/**Other css may needed to adjust UI components**/

其结果是:

另一个例子:

content {
  background-image: url(http://localhost:4000/media/background/crashed_ship_by_hiddenvortexdesigns-da57nk8.jpg);
  background-repeat: repeat;
  background-position: -52px;
}

#write {
  margin-top: 24px;
  background-color: rgba(255, 255, 255, 0.68);
  margin-bottom: 24px;
  min-height: calc(100% - 48px);
}

body {
  background-color: #8F9D9A;
}

/**Other CSS to adjust UI components*/