- normal
- bold
- bolder
- lighter
- 100
- 200
- 300
- 400
- 500
- 600
- 700
- 800
- 900
但大多數字型只有 normal 與 bold 的分別,舉例如下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | .examplenormal { font-weight : normal ; } .examplebold { font-weight : bold ; } .examplebolder { font-weight : bloder; } .examplelighter { font-weight : lighter ; } .example 100 { font-weight : 100 ; } .example 200 { font-weight : 200 ; } .example 300 { font-weight : 300 ; } .example 400 { font-weight : 400 ; } .example 500 { font-weight : 500 ; } .example 600 { font-weight : 600 ; } .example 700 { font-weight : 700 ; } .example 800 { font-weight : 800 ; } .example 900 { font-weight : 900 ; } /* 《程式語言教學誌》的範例程式 檔名:text03.css 功能:示範 CSS 2.1 樣式表的使用 作者:張凱慶 時間:西元 2011 年 7 月 */ |
此例中並沒有設定字型體系或名稱,因此會以預設字型顯示,我們以下面的 HTML 文件載入
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | < html lang = "en" > < head > < title >網頁標題</ title > < link rel = "stylesheet" type = "text/css" href = "text03.css" > </ head > < body > < p class = "examplenormal" > Free your mind. </ p > < p class = "examplebold" > Free your mind. </ p > < p class = "examplebolder" > Free your mind. </ p > < p class = "examplelighter" > Free your mind. </ p > < p class = "example100" > Free your mind. </ p > < p class = "example200" > Free your mind. </ p > < p class = "example300" > Free your mind. </ p > < p class = "example400" > Free your mind. </ p > < p class = "example500" > Free your mind. </ p > < p class = "example600" > Free your mind. </ p > < p class = "example700" > Free your mind. </ p > < p class = "example800" > Free your mind. </ p > < p class = "example900" > Free your mind. </ p > </ body > </ html > <!-- 《程式語言教學誌》的範例程式 檔名:text02.html 功能:示範 CSS 2.1 樣式表的使用 作者:張凱慶 時間:西元 2011 年 7 月 --> |
瀏覽器 (broswer) 開啟如下

中英文術語對照 | |
---|---|
性質 | property |
數值 | value |
瀏覽器 | broswer |
您可以繼續參考
JavaScript 範例
文字相關
- 字型顏色 color
- 字型種類 font-family
- 字型粗細 font-weight
- 字型尺寸 font-size
- 字型格式 font-style
- 字型變體 font-variant
- 字型伸縮 font-stretch
- 字型大小 font-size-adjust
- 字型 font
- 文字縮排 text-indent
- 水平對齊 text-align
- 文字行高 line-height
- 垂直對齊 vertical-align
- 單字間距 word-spacing
- 字元間距 letter-spacing
- 大小寫轉換 text-transform
- 文字裝飾 text-decoration
- 文字陰影 text-shadow
- 空白字元 white-space
- 文字方向 direction
相關目錄
CSS 2.1 快速導覽
HTML, CSS 教材
首頁
參考資料
http://www.w3.org/TR/CSS21/fonts.html
https://developer.mozilla.org/en/CSS/font-weight
沒有留言:
張貼留言