Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emisjerry/123d62fc6e9ac7d1e9811728ac95d2a0 to your computer and use it in GitHub Desktop.
Save emisjerry/123d62fc6e9ac7d1e9811728ac95d2a0 to your computer and use it in GitHub Desktop.
[5. Obsidian(黑曜石) 高亮度顯示或變更文字顏色的3種方法] 解說文章 #obsidian #blog

Obsidian(黑曜石) 高亮度顯示或變更文字顏色的3種方法

❓ 這個軟體可以筆記高亮、換字體顏色之類的嗎?

方法一:使用兩個等號

用兩個半形等號讓文字變高亮度

`用兩個半形等於可以==讓某些文字==變高亮度`

用兩個半形等於可以==讓某些文字==變高亮度

  • 參考:Obsidian擴充的Markdown語法:[[Format your notes#Obsidian specific]]

方法二:修改CSS設定

例如變更粗體斜體刪除的樣式以支援顏色。 修改檔案:保管箱(vault)根目錄裡的 ==obsidian.css==:

/* 粗體 */
strong {
  color: red;
}

/* 斜體 */
em {
  color: blue;
  --font-style: normal; /*不要斜體:刪除開頭的減號*/
}

/* 刪除 */
s {
  color: green;
  text-decoration: none;
}

方法三:HTML標籤

3.1. 文字顏色

在HTML標籤使用|class屬性(不知為何,style無法生效)。

例如使用fontspan標籤:

.red {
  color: red;
}

.bg-red {
  background-color: red;
}
H<font color="#f00">ello</font>, World
Hello, <span class="red">World</span>

Hello, World Hello, World

  • style無效 Hello, World.
Hello, <font style="color: red">World</span>.

3.2. 文字背景色

Hello, <span class="bg-red">World</span>

Hello, World

3.3. 整列背景色

<table width="100%">
    <tr>
        <td bgcolor=orange>背景色是:orange</td>
    </tr>
</table>
背景色是:orange
.red {
color: red;
}
.bg-red {
color: white;
background-color: red;
}
/* 粗體 */
strong {
color: red;
}
/* 斜體 */
em {
color: blue;
--font-style: normal;
}
/* 刪除 */
s {
color: green;
text-decoration: none;
}
@DemonJerry0527
Copy link

strong {12
color: red;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment