css样式之border-image

2018-06-24 00:52:23来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

border-image-source 属性设置边框的图片的路径[none | <image>]

 div {
   border: 20px solid #000;
   border-image-source: url(border.png);
}

border-image-slice 属性图片边框向内偏移[ <number> | <percentage> ](1,4) ?fill

 div {
   border: 20px solid #000;
   border-image-source: url(border.png);
   border-image-slice: 27,27,27,27;
}

border-image-width 属性设置图片边框的宽度[ <length>|<number> |<percentage> | auto](1,4)

 div {
   border: 20px solid #000;
   border-image-source: url(border.png);
   border-image-slice: 27,27,27,27;
   border-image-width: 27px 1 10% 27px;
}

border-image-outset 属性设置边框图像区域超出边框的量[ <length>|<number> ](1,4)

 div {
   border: 20px solid #000;
   border-image-source: url(border.png);
   border-image-slice: 27,27,27,27;
   border-image-width: 27px 1 10% 27px;
   border-image-outset: 27px 27px 27px 27px;
}

border-image-repeat 属性设置图像边框是否应平铺(repeated)、铺满(rounded)或拉伸(stretched)(1,2)

 div {
   border: 20px solid #000;
   border-image-source: url(border.png);
   border-image-slice: 27,27,27,27;
   border-image-width: 27px 1 10% 27px;
   border-image-outset: 27px 27px 27px 27px;
   border-image-repeat: rounded;
   border-image: url(border.png) 27  rounded;
}

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Flexible 弹性盒子模型之CSS flex-shrink 属性

下一篇:前端开发常用技巧