--- title: border-image-source slug: Web/CSS/border-image-source translation_of: Web/CSS/border-image-source ---
CSS 属性 border-image-source
用于声明元素的边框图片(border-image)的资源
{{EmbedInteractiveExample("pages/css/border-image-source.html")}}
属性 {{cssxref("border-image-slice")}} 被用于切割资源图片的区域,然后将其动态的应用到最终的边框图片
/* no border-image, use the specified border-style */ border-image-source: none; /* the image.jpg is used as image */ border-image-source: url(image.jpg); /* a gradient is used as image */ border-image-source: linear-gradient(to top, red, yellow); /* Global values */ border-image-source: inherit; border-image-source: initial; border-image-source: unset;
none
<image>
请查看示例 {{cssxref("border-image")}}。
Specification | Status | Comment |
---|---|---|
{{SpecName('CSS3 Backgrounds', '#border-image-source', 'border-image-source')}} | {{Spec2('CSS3 Backgrounds')}} | Initial definition |
{{cssinfo}}