border-top-width版本:CSS1 兼容性:IE4+ NS4+ 繼承性:無
語法:
border-top-width : medium | thin | thick | length
取值:
| medium | :𨪜 | 默認值。默認寬度 |
| thin | :𨪜 | 小於默認寬度 |
| thick | :𨪜 | 大於默認寬度 |
| length | :𨪜 | 由浮點數字和單位標識符組成的長度值。不可為負值。請參閱 長度單位 |
說明:
設置對像上邊框的寬度。
此屬性對於
currentStyle 對像而言是只讀的。對於其他對像而言是可讀寫的。
在 IE5.5+ 中,邊框屬性可以直接應用於內聯要素。而在此前的版本中,內聯要素要使用該屬性,必須先設定對象的
height 或
width 屬性,或者設定
position 屬性為
absolute ,或者設定
display 屬性為
block 。
對應的腳本特性為
borderTopWidth 。
示例:
span { border-top-width: thin; border-top-style: solid; }
span { border-bottom-width: thin; border-bottom-style: solid; }
span { border-left-width: thin; border-left-style: solid; }
span { border-right-width: thin; border-right-style: solid; }