当前位置:软件学堂 > 资讯首页 > 网络编程 > DIV+CSS > css padding-bottom底部属性

css padding-bottom底部属性

2012/11/26 15:49:15作者:佚名来源:网络

移动端

【实例介绍】

css padding-bottom底部属性

padding-bottom属性设置元素的下内边距(底部空白)。

【基本语法】

padding-bottom:length

【语法介绍】

该属性设置元素下内边距的宽度。行内非替换元素上设置的下内边距不会影响行高计算,因此,如果一个元素既有内边距又有背景,从视觉上看可能延伸到其他行,有可能还会与其他内容重叠。不允许指定负内边距值。

【实例代码】

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> td {padding-bottom: 5cm} </style> </head> <body> <table border="1"> <tr> <td> 这个表格单元拥有下内边距。 </td> </tr> </table> </body> </html>

【代码分析】

在代码中,加粗代码是设置底部边距,在浏览器中预览,如图所示。

底部属性padding-bottom运行效果
 【素材及源码下载】

请点击:底部属性css padding-bottom 下载本实例相关素材及源码

 

标签: 属性