當(dāng)前位置:軟件學(xué)堂 > 資訊首頁 > 網(wǎng)絡(luò)編程 > DIV+CSS > css padding-right右側(cè)屬性

css padding-right右側(cè)屬性

2012/11/26 15:48:44作者:佚名來源:網(wǎng)絡(luò)

移動端

【實例介紹】

css padding-right右側(cè)屬性

該CSS屬性用來設(shè)定右間隙的寬度。

【基本語法】

padding-right:length

【語法介紹】

該屬性設(shè)置元素右內(nèi)邊距的寬度。行內(nèi)非替換元素上設(shè)置的右內(nèi)邊距僅在元素所生成的第一個行內(nèi)框的右邊出現(xiàn)。

【實例代碼】

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>無標(biāo)題文檔</title> <style type="text/css"> td {padding-right: 12} </style> </head> <body> <table border="1"> <tr> <td> 這個表格單元擁有右內(nèi)邊距。 </td> </tr> </table> </body> </html>

【代碼分析】

在代碼中,加粗部分的標(biāo)記是設(shè)置右間距為12像素,在瀏覽器中預(yù)覽,如圖所示。

右側(cè)屬性padding-right運行效果

 【素材及源碼下載】

請點擊:右側(cè)屬性css padding-right 下載本實例相關(guān)素材及源碼

 

標(biāo)簽: css padding-right  右側(cè)  屬性