最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
CSS设计网页边框 boader使用方法
时间:2008-06-11 编辑:简简单单 来源:一聚教程网
实例一:
CSS:
p {padding: 15px; border: 1px solid black; }
h5{padding: 0px; border: 1px solid red;}
XHTML:
This is a paragraph that has a padding of 15 pixels on every side: top, right, bottom, and left.
This header has no padding, which places the text right against the border!
实例二:
CSS:
p {padding: 2%; border: 1px solid black; }
h5{padding: 0px; border: 1px solid red;}
XHTML:
This is a paragraph that has a padding of 5 pixels on every side: left, top, right, and bottom.
This header has no padding. It is only spaced away from the paragraph because the paragraph has a padding of 5 pixels!
实例三:
CSS:
p { padding-left: 5px; border: 1px solid black; }
h5{
padding-top: 0px;
padding-right: 2px;
padding-bottom: 13px;
padding-left: 21px;
border: 1px solid red;
}
XHTML:
This paragraph had one padding specified(left), using directional declaration.
This header had each padding specified separately, using directional declaration.
实例四:
CSS:
p {
padding: 5px 15px;
border: 1px solid black;
}
h5{
padding: 0px 5px 10px 3px;
border: 1px solid red;
}
XHTML:
This paragraph has a top and bottom padding of 5 pixels and a right and left padding of 15 pixels.
This header has a top padding of 0 pixels, a right padding of 5 pixels, a bottom padding of 10 pixels, and a left padding of 3 pixels.
-
上一个: CSS命名规范二 入门篇
-
下一个: css控制层在底部
相关文章
- CSS网页渲染效率怎么提高 03-29
- css网页布局用Margin还是用Padding 08-06
- 详解网页CSS代码挂马过程 07-11
- div+css网页布局中下划线text-decoration使用教程 01-05
- 让您头痛的DIV+CSS网页错位诊断及解决办法 01-05
- DIV+CSS网页模板开发初始化CSS的好处 01-04