當前位置:軟件學堂 > 資訊首頁 > 網(wǎng)絡(luò)編程 > DIV+CSS > css border-spacing屬性(表格邊框間距)

css border-spacing屬性(表格邊框間距)

2012/11/25 22:01:07作者:佚名來源:網(wǎng)絡(luò)

移動端

【實例介紹】

css border-spacing屬性(表格邊框間距)

border-spacing屬性設(shè)置相鄰單元格邊框間的距離。

【基本語法】

border-spacing:lenght

【語法介紹】

該屬性指定單元格邊界之間的距離。當只指定一個length值時,這個值將作用于橫向和縱
向上的間距。當指定了兩個length ff澍,第一個作用于橫向間距,第二個作用于縱向間距。

【實例代碼】

<!DOCTYPE html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>無標題文檔</title> </head> <body> <table bordercolor="#FF0000" width="200" border="1" style="border-spacing:20px;">   <tr>     <td>&nbsp;</td>     <td>&nbsp;</td>     <td>&nbsp;</td>   </tr>   <tr>     <td>&nbsp;</td>     <td>&nbsp;</td>     <td>&nbsp;</td>   </tr> </table> <p>&nbsp;</p> <table  bordercolor="#FF0000" width="200" border="1" cellspacing="5">   <tr>     <td>&nbsp;</td>     <td>&nbsp;</td>     <td>&nbsp;</td>   </tr>   <tr>     <td>&nbsp;</td>     <td>&nbsp;</td>     <td>&nbsp;</td>   </tr> </table> <p>&nbsp;</p> </body> </html>

【代碼分析】

表格邊框間距
 【素材及源碼下載】

請點擊:css border-spacing屬性(表格邊框間距) 下載本實例相關(guān)素材及源碼

 

標簽: 表格  屬性  邊框間距