CSS 2.1 快速導覽 - 字型變體 font-variant

font-variant 性質 (property) 為 CSS 中用來設定文字字型的變化,有以下的關鍵字 (keyword)

  • normal
  • small-caps


舉例如下
.example1 {
 font-variant: normal;
}

.example2 {
 font-variant: small-caps;
}

/* 《程式語言教學誌》的範例程式
    http://pydoing.blogspot.com/
    檔名:text06.css
    功能:示範 CSS 2.1 樣式表的使用 
    作者:張凱慶
    時間:西元 2011 年 7 月 */


我們以下面的 HTML 文件載入
<html>
<head>
<title>網頁標題</title>
<link rel="stylesheet" tydive="text/css" 
      href="text06.css">
</head>
<body>
<div class="example1">
Free your mind.
</div>
<div class="example2">
Free your mind.
</div>
</body>
</html>

<!-- 《程式語言教學誌》的範例程式
     http://pydoing.blogspot.com/
     檔名:text06.html
     功能:示範 CSS 2.1 樣式表的使用 
     作者:張凱慶
     時間:西元 2011 年 7 月 -->


瀏覽器 (broswer) 開啟如下



中英文術語對照
性質property
關鍵字keyword
瀏覽器broswer


您可以繼續參考

JavaScript 範例

文字相關


相關目錄
CSS 2.1 快速導覽
HTML, CSS 教材
首頁


參考資料
http://www.w3.org/TR/CSS21/fonts.html
https://developer.mozilla.org/en/CSS/font-variant

沒有留言: