css border-spacing 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

spacing

英[ˈspeɪsɪŋ] 美[ˈspesɪŋ]

n. Spacing, spacing; span; density; spacing

css border-spacing propertysyntax

Function:border-spacing property sets the distance between the borders of adjacent cells (only used in "border separation" mode).

Description: This property specifies the distance between cell boundaries in the separated border model. Of the two length values ​​specified, the first is the horizontal gap and the second is the vertical gap. This property is ignored unless border-collapse is set to separate. Although this property only applies to tables, it is inherited by all elements in the table.

Note: Some versions of IE browsers do not support this attribute. All major browsers support the border-spacing attribute. Internet Explorer 8 (and later) supports the border-spacing attribute if !DOCTYPE is specified.

css border-spacing propertyexample

<!DOCTYPE>
<html>
<head>
<style type="text/css">
table.one 
{
border-collapse: separate;
border-spacing: 10px
}
table.two
{
border-collapse: separate;
border-spacing: 10px 50px
}
</style>
</head>
<body>
<table class="one" border="1">
<tr>
<td>Adams</td>
<td>John</td>
</tr>
<tr>
<td>Bush</td>
<td>George</td>
</tr>
</table>
<br />
<table class="two" border="1">
<tr>
<td>Carter</td>
<td>Thomas</td>
</tr>
<tr>
<td>Gates</td>
<td>Bill</td>
</tr>
</table>
<p><b>注释:</b>php中文网</p>
</body>
</html>
Run instance »

Click the "Run instance" button to view the online instance

Popular Recommendations

Home

Videos

Q&A