border
英 [?b?:d?(r)]? ?美 [?b?:rd?(r)]??
n.邊界;邊;鑲邊;包邊
vt.& vi.與…接界,在…的邊上
vt.沿…的邊,環(huán)繞…,給…鑲邊
vi.近似,毗鄰
第三人稱單數(shù): borders 復(fù)數(shù): borders 現(xiàn)在分詞: bordering 過去式: bordered 過去分詞: bordered
width
英 [w?dθ]? ?美 [w?dθ, w?θ, w?tθ]??
n.寬度;廣度
復(fù)數(shù): widths
css border-width屬性 語法
作用:為元素的所有邊框設(shè)置寬度,或者單獨(dú)地為各邊邊框設(shè)置寬度。
說明:只有當(dāng)邊框樣式不是 none 時(shí)才起作用。如果邊框樣式是 none,邊框?qū)挾葘?shí)際上會(huì)重置為 0。不允許指定負(fù)長度值。
注釋:任何的版本的 Internet Explorer (包括 IE8)都不支持屬性值 "inherit"。
css border-width屬性 示例
<html> <head> <style type="text/css"> p.one { border-style: solid; border-width: 5px } p.two { border-style: solid; border-width: thick } p.three { border-style: solid; border-width: 5px 10px } p.four { border-style: solid; border-width: 5px 10px 1px } p.five { border-style: solid; border-width: 5px 10px 1px medium } </style> </head> <body> <p class="one">Some text</p> <p class="two">Some text</p> <p class="three">Some text</p> <p class="four">Some text</p> <p class="five">Some text</p> <p><b>注釋:</b>"border-width" 屬性如果單獨(dú)使用的話是不會(huì)起作用的。請(qǐng)首先使用 "border-style" 屬性來設(shè)置邊框。</p> </body> </html>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例