当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS 填充

CSS
CSS 介绍
CSS 语法
使用 CSS
CSS 背景
CSS 文字
CSS 字体
CSS 边框
CSS 边距
CSS 填充
CSS 列表
CSS 尺寸
CSS 类别
CSS 定位
CSS 伪类
CSS 伪元素
CSS2 Media类型
CSS 摘要
CSS 实例
CSS2 参考资料
CSS2 打印

CSS 填充


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 896 ::
收藏到网摘: n/a

The CSS padding properties define the space between the element border and the element content.
CSS填充属性定元素边框到内部内容间的距离


Examples

Set the left padding
This example demonstrates how to set the left padding of a tablecell.
设置左填充

Set the right padding
This example demonstrates how to set the right padding of a tablecell.
设置右填充

Set the top padding
This example demonstrates how to set the top padding of a tablecell.
设置上填充

Set the bottom padding
This example demonstrates how to set the bottom padding of a tablecell.
设置底部填充

All the padding properties in one declaration
This example demonstrates a shorthand property for setting all of the padding properties in one declaration, can have from one to four values.
快速设置所有填充属性


CSS Padding Properties
CSS填充属性

The CSS padding properties define the space between the element border and the element content. Negative values are not allowed. The top, right, bottom, and left padding can be changed independently using separate properties. A shorthand padding property is also created to control multiple sides at once.
可用padding属性快速设置各方向填充的属性

Browser support: IE: Internet Explorer, F: Firefox, N: Netscape.
浏览器支持:IE: Internet Explorer, F: Firefox, N: Netscape

W3C: The number in the "W3C" column indicates in which CSS recommendation the property is defined (CSS1 or CSS2).
W3C:里面的数字代表CSS版本号

Property属性 Description描述 Values值 IE F N W3C
padding A shorthand property for setting all of  the padding properties in one declaration
一种可针对所有填充属性进行一次声明的速记属性
padding-top
padding-right
padding-bottom
padding-left
4 1 4 1

padding-bottom

Sets the bottom padding of an element
设置元素的底填充
length
%
4 1 4 1

padding-left

Sets the left padding of an element
设置元素的左填充
length
%
4 1 4 1

padding-right

Sets the right padding of an element
设置元素的右填充
length
%
4 1 4 1
padding-top Sets the top padding of an element
设置元素的顶部填充
length
%
4 1 4 1

评论 (0) All

登陆 | 还没注册?