css border-width property
Translation results:
border
UK[ˈbɔ:də(r)] US[ˈbɔ:rdə(r)]
n.Border; edge; edging; wrapping Edge
vt.& vi. Bound with, on the edge of...
vt. Along the edge of, surround..., edge...
vi. Approximate, adjacent
Third person singular: borders Plural: borders Present participle: bordering Past tense: bordered Past participle: bordered
width
英[ wɪdθ] 美[wɪdθ, wɪθ, wɪtθ]
n.Width; breadth
Plural: widths
css border-width propertysyntax
Function:Set the width of all borders of the element, or set the width of each border individually.
Note: Only works when the border style is not none. If the border style is none, the border width is actually reset to 0. Negative length values are not allowed.
Note: The attribute value "inherit" is not supported by any version of Internet Explorer (including IE8).
css border-width propertyexample
<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" 属性如果单独使用的话是不会起作用的。请首先使用 "border-style" 属性来设置边框。</p> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance