Macintosh 系統的 HTML5 字型


由於瀏覽器不需要下載任何字型檔案,因為它已經在使用一種字型,因此預設使用特定作業系統的系統字型可以提高效率。但這對任何網路安全字型都是適用的。系統字型具有與當前作業系統使用的字型匹配的優點,使它們在視覺上更令人愉悅。

Microsoft 列表中的一些字型也與 Macintosh 系統相容。它們是

Andale Mono, Arial, Arial Black, Comic Sans MS, Courier New, Impact, Trebuchet, Verdana, Symbol, Webdings and Times New Roman

Microsoft 作業系統不可用的但在 Macintosh 系統中支援的字型是

American Typewriter, Apple Chancery, Baskerville, Big Caslon, Brush Script, Capitals, Charcoal, Hoefler Text Ornaments

讓我們展望一下對 Macintosh 系統字型的理解。以下是 Macintosh 系統 HTML5 字型的示例。

使用“Verdana”字型

Verdana 字型非常受歡迎。即使在很小的字型大小下,Verdana 也很容易閱讀。

示例

在以下示例中,我們使用“verdana”字型。

<!DOCTYPE html>
<html>
<style>
body {
   font-family: Verdana;
}
</style>
<body>
   <h1>WELCOME TO TUTORIALSPOINT</h1>
   <p>The Best E-Way Learning</p>
</body>
</html>

輸出

當指令碼執行時,它將生成一個輸出,在網頁上以 verdana 樣式顯示上述指令碼中使用的文字。

使用“Courier New”字型

最流行的等寬襯線字型是 Courier New。許多電子郵件服務將 Courier New 設定為其預設字型,並且它經常用於程式碼顯示。Courier New 是電影劇本的首選字型。

示例

在以下示例中,我們使用“courier new”字型。

<!DOCTYPE html>
<html>
<style>
body {
   font-family: 'Courier New';
}
</style>
<body>
   <h1>MSD</h1>
   <p>Mahendra Singh Dhoni is an Indian former professional cricketer
   who was captain of the Indian national cricket team in limited-overs
   formats from 2007 to 2017 and in Test cricket from 2008 to 2014.</p>
</body>
</html>

輸出

執行上述指令碼後,它將生成一個輸出,其中包含指令碼中使用的文字,並在網頁上以 courier new 樣式顯示。

使用“Brush Script MT”字型

Brush Script MT 字型的目的是模仿手寫字型。儘管它經過細化且具有吸引力,但可能難以閱讀。謹慎使用它。

示例

在以下示例中,我們使用“Brush Script MT”字型。

<!DOCTYPE html>
<html>
<style>
body {
   font-family: 'Brush Script MT';
}
</style>
<body>
   <h1>JP DUMINY</h1>
   <p>Jean-Paul Duminy, more commonly known as JP Duminy,
   is a South African cricket commentator, and former international cricketer. 
   He was vice-captain of the South Africa Twenty20 team.</p>
</body>
</html>

輸出

當用戶嘗試執行指令碼時,它將顯示一個輸出,其中包含網頁上以 Brush Script MT 顯示的文字。

使用“Trebuchet Ms”字型

Trebuchet MS 是另一種網路安全無襯線字型。它可以很好地替代您網站的無襯線字型,因為它經常用於許多網站的正文內容。它甚至可能沒有 Arial 的“基本”外觀。

示例

在以下示例中,我們使用“Trebuchet Ms”字型。

<!DOCTYPE html>
<html>
<style>
body {
   font-family: 'trebuchet ms';
}
</style>
<body>
   <h1>AB DEVILLERS</h1>
   <p>
Abraham Benjamin de Villiers is a former South African international cricketer.
AB de Villiers was named as the ICC ODI Player of the Year three times during 
his 15-year international career</p>
</body>
</html>

輸出

當指令碼執行時,它將生成一個輸出,在網頁上以 Trebuchet Ms 樣式顯示上述指令碼中使用的文字。

更新於: 2023年10月11日

119 次瀏覽

開啟你的 職業生涯

完成課程獲得認證

開始學習
廣告

© . All rights reserved.