CSS3之边框图片

来源:互联网 发布:请问淘宝店怎么开 编辑:程序博客网 时间:2024/04/30 00:43

边框图片border-image

1    border-image-sourceg 引入图片

2    border-image-slice 切割图片

          属性值没有单位,默认单位为像素。支持百分比,百分比值总是相对于边框图像而言。

3    border-image-slice包含4个参数,遵循css方位规则,按照上,右,下,左的顺时针方向赋值剪裁。

 

4    border-image-width 边框宽度

 

5    border-image-repeat 图片的排列方式

round 平铺,repeat 重复,stretch拉伸

 

引入图片样式:

<style>

.box{width:200px;height:60px; -webkit-border-image:url(bt_blue.png)0 10;

border-left-width:10px;border-right-width:10px;}

</style>

</head>

<body>

<div class="box"></div>

</body>

 


 

 

引入的图片样式


<style>

.box{width:100px;height:100px; border-width:20px;-webkit-border-image:url(border.png) 27 27 round stretch;}

</style>

</head>

<body>

<div class="box"></div>

</body>

 


    边框颜色 border-colors

<style>

.box{width:100px;height:100px;border:10px solid #000;-moz-border-left-colors:red blue yellow red blue yellow red blue yellow;}

</style>

</head>

<body>

<div class="box"></div>

</body>

目前只有火狐支持


0 0
原创粉丝点击