- thin
- medium
- thick
另外還有左邊框格式 border-left-width 、右邊框格式 border-right-width 、上邊框格式 border-top-width ,下邊框格式 border-bottom-width 。
有幾種情況
border-width : thin ; /* 上下左右皆 thin */ border-width : thin 0px ; /* 上下 thin ,左右 0px */ border-width : thin 6px 4px ; /* 上 thin ,左右 6px, 下 4px */ border-width : 1px 2px 3px 4px ; /* 依序上、右、下、左,順時針方向 */ |
舉例如下
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 | img { width : 200 ; height : 150 ; padding : 5px ; margin : 3px ; border-style : solid ; } .example 1 { border-width : thin ; } .example 2 { border-width : thin 0px ; } .example 3 { border-width : thin 6px 4px ; } .example 4 { border-width : 2px 4px 6px 8px ; } /* 《程式語言教學誌》的範例程式 檔名:block24.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 | < html > < head > < title >網頁標題</ title > < link rel = "stylesheet" type = "text/css" href = "block24.css" > </ head > < body > < img class = "example1" src = "example.jpg" > < img class = "example2" src = "example.jpg" > < img class = "example3" src = "example.jpg" > < img class = "example4" src = "example.jpg" > </ body > </ html > <!-- 《程式語言教學誌》的範例程式 檔名:block24.html 功能:示範 CSS 2.1 樣式表的使用 作者:張凱慶 時間:西元 2011 年 7 月 --> |
瀏覽器 (broswer) 開啟如下

中英文術語對照 | |
---|---|
性質 | property |
區塊元素 | block element |
邊框 | border |
關鍵字 | keyword |
瀏覽器 | broswer |
您可以繼續參考
JavaScript 範例
區塊相關
- 寬度 width
- 高度 height
- 邊界 margin
- 左邊界 margin-left
- 右邊界 margin-right
- 上邊界 margin-top
- 下邊界 margin-bottom
- 邊距 padding
- 左邊距 padding-left
- 右邊距 padding-right
- 上邊距 padding-top
- 下邊距 padding-bottom
- 邊框格式 border-style
- 左邊框格式 border-left-style
- 右邊框格式 border-right-style
- 上邊框格式 border-top-style
- 下邊框格式 border-bottom-style
- 邊框粗細 border-width
- 左邊框粗細 border-left-width
- 右邊框粗細 border-right-width
- 上邊框粗細 border-top-width
- 下邊框粗細 border-bottom-width
- 邊框顏色 border-color
- 左邊框顏色 border-left-color
- 右邊框顏色 border-right-color
- 上邊框顏色 border-top-color
- 下邊框顏色 border-bottom-color
- 邊框 border
- 左邊框 border-left
- 右邊框 border-right
- 上邊框 border-top
- 下邊框 border-bottom
相關目錄
CSS 2.1 快速導覽
HTML, CSS 教材
首頁
參考資料
http://www.w3.org/TR/CSS21/box.html
https://developer.mozilla.org/en/CSS/border-width
沒有留言:
張貼留言