當(dāng)前位置:軟件學(xué)堂 > 資訊首頁(yè) > 網(wǎng)絡(luò)編程 > DIV+CSS > css caption-side屬性(表格標(biāo)題位置)

css caption-side屬性(表格標(biāo)題位置)

2012/11/25 22:02:39作者:佚名來(lái)源:網(wǎng)絡(luò)

移動(dòng)端

【實(shí)例介紹】

css caption-side屬性(表格標(biāo)題位置)

【基本語(yǔ)法】

fcaption-side:top|right|bottom|left

【語(yǔ)法介紹】

該屬性指定了表格標(biāo)題相對(duì)于表框的放置位置。表格標(biāo)題顯示為好像它是表之前(或之后)
的一個(gè)塊級(jí)元素。

【實(shí)例代碼】

<!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>無(wú)標(biāo)題文檔</title> <style type="text/css"> caption {caption-side:bottom} </style> </head> <body> <table border="1"> <caption> 標(biāo)題 </caption> <tr> <td>李敏</td> <td>小莉</td> </tr> <tr> <td>國(guó)良</td> <td>秀秀</td> </tr> </table> </body> </html> 【代碼分析】

在代碼中,加粗部分是設(shè)置標(biāo)題的位置在底部,如圖15.3所示。

表格標(biāo)題位置屬性
 【素材及源碼下載】

請(qǐng)點(diǎn)擊:css caption-side屬性(表格標(biāo)題位置) 下載本實(shí)例相關(guān)素材及源碼

 

標(biāo)簽: 表格  屬性  標(biāo)題位置