详解css样式中的border-image

详解css样式中的border-image,第1张

详解css样式中的border-image

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;
}

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持脚本之家!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/617947.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-15
下一篇 2022-04-15

发表评论

登录后才能评论

评论列表(0条)

保存