css教程:CSS边框border属性的应用
TheCSSborderpropertiesdefinethebordersaroundanelement. CSS边框属性用来定义环绕元素的边框(样式) 设置四个边框的样式Setthestyleofthefourborders Thisexampledemonstrateshowtosetthestyleofthefourborders. Examples实例:
The CSS border properties define the borders around an element.
CSS边框属性用来定义环绕元素的边框(样式)
设置四个边框的样式 Set the style of the four borders
This example demonstrates how to set the style of the four borders.
Examples 实例:
Source Code to Run [www.fun52.com]
p.dotted {border-style: dotted}
p.dashed {border-style: dashed}
p.solid {border-style: solid}
p.double {border-style: double}
p.groove {border-style: groove}
p.ridge {border-style: ridge}
p.inset {border-style: inset}
p.outset {border-style: outset}
虚点边框
虚线边框
实线边框
空心边框
虚边框
实边框
凹边框
凸边框
[ 可先修改部分代码 再运行查看效果 ]
分别设置每个边框 Set different borders on each side
This example demonstrates how to set different borders on each side of the element.
Examples 实例:
Source Code to Run [www.fun52.com]
p.soliddouble {border-style: solid double}
p.doublesolid {border-style: double solid}
p.groovedouble {border-style: groove double}
p.three {border-style: solid double groove}
欢迎来到 fun52.com
欢迎来到 fun52.com
欢迎来到 fun52.com
欢迎来到 fun52.com
[ 可先修改部分代码 再运行查看效果 ]
四边框颜色设置 Set the color of the four borders
This example demonstrates how to set the color of the four borders. It can have from one to four colors.
Examples 实例:
Source Code to Run [www.fun52.com]
p.one
{
border-style: solid;
border-color: #0000ff
}
p.two
{
border-style: solid;
第 1 2 3 4 5 页
CSS边框属性用来定义环绕元素的边框(样式)
设置四个边框的样式 Set the style of the four borders
This example demonstrates how to set the style of the four borders.
Examples 实例:
Source Code to Run [www.fun52.com]
p.dotted {border-style: dotted}
p.dashed {border-style: dashed}
p.solid {border-style: solid}
p.double {border-style: double}
p.groove {border-style: groove}
p.ridge {border-style: ridge}
p.inset {border-style: inset}
p.outset {border-style: outset}
虚点边框
虚线边框
实线边框
空心边框
虚边框
实边框
凹边框
凸边框
[ 可先修改部分代码 再运行查看效果 ]
分别设置每个边框 Set different borders on each side
This example demonstrates how to set different borders on each side of the element.
Examples 实例:
Source Code to Run [www.fun52.com]
p.soliddouble {border-style: solid double}
p.doublesolid {border-style: double solid}
p.groovedouble {border-style: groove double}
p.three {border-style: solid double groove}
欢迎来到 fun52.com
欢迎来到 fun52.com
欢迎来到 fun52.com
欢迎来到 fun52.com
[ 可先修改部分代码 再运行查看效果 ]
四边框颜色设置 Set the color of the four borders
This example demonstrates how to set the color of the four borders. It can have from one to four colors.
Examples 实例:
Source Code to Run [www.fun52.com]
p.one
{
border-style: solid;
border-color: #0000ff
}
p.two
{
border-style: solid;
第 1 2 3 4 5 页
精彩图集
精彩文章