介绍
这篇文章给大家分享的是有关css中border-image-width属性如何使用的内容。小编觉得挺实用的,因此分享给大家做个参考。一起跟随小编过来看看吧。
css border-image-width属性用于指定图像边界的宽度,可以设置4个值(不可为负值),把边框图像分割为九个部分。它们代表了从区域的上,右,下,左侧向内的距离。
border-image-width属性规定图像边框的宽度。
<强>语法:强>
border-image-width:数量| % |汽车;
<强>属性值:强>
号码:表示相应的边框宽度的倍数
%:边界图像区域的大小:横向偏移的宽度的面积、垂直偏移的高度的面积
汽车:如果指定了,宽度是相应的image-slice的内在宽度或高度。
<强>注释:强>
border-image-width属性的的4个值指定用于把边框图像分割为九个部分。它们代表了从区域的上,右,下,左侧向内的距离。
如果忽略第四个值,则与第二个值相同。如果省略第三个值,则与第一个值相同。如果省略第二个值,则与第一个值相同。不允许任何负值作为border-image-width值。
<强> css border-image-width属性示例强>
& lt; !DOCTYPE html> & lt; html> & lt; head> & lt;元charset=癠TF-8"祝辞 & lt; style> div { 边界:30 px固体透明; border-image: url (& # 39; https://img.php.cn/upload/article/000/000/024/5c62637b1a4fe853.png& # 39;); border-image-width:汽车; border-image-repeat:圆形; border-image-slice: 30; } & lt;/style> & lt;/head> & lt; body> & lt; div> DIV使用图像边框& lt;/div> & lt; p>使用的图片:& lt;/p> https://www.yisu.com/zixun/& lt; img src=" https://img.php.cn/upload/article/000/000/024/5c62637b1a4fe853.png "> 身体>