举报投诉联系我们 手机版 热门标签 编程学
您的位置:编程学 > html border style HTML DOM Style borderImageSlice 属性

html border style HTML DOM Style borderImageSlice 属性

2023-04-19 07:18

html border style HTML DOM Style borderImageSlice 属性

html border style HTML DOM Style borderImageSlice 属性

html border style

Style borderImageSlice 属性

Style 对象参考手册 Style 对象

实例

规定图像边框的向内偏移:

document.getElementById("myDIV").style.borderImageSlice="50% 10%";


定义和用法

borderImageSlice 属性规定图像边框的向内偏移。


浏览器支持

Internet Explorer Firefox Opera Google Chrome Safari

Opera 不支持 borderImageSlice 属性。

Internet Explorer 10 及其之前的版本不支持 borderImageSlice 属性。

Safari 5 及其之前的版本不支持 borderImageSlice 属性。

请参阅 borderImage 属性来替代它!


语法

返回 borderImageSlice 属性:

object.style.borderImageSlice

设置 borderImageSlice 属性:

object.style.borderImageSlice="number|%|fill|initial|inherit"

属性值

描述
number 表示图像像素(如果图像是光栅图像)或矢量坐标(如果图像是矢量图像)的数字。
% 表示相对于图像大小的百分比:水平偏移参照图像的宽度,垂直偏移参照图像的高度。默认值是 100%。
fill 使边框图像中间部分被保留下来。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

技术细节

默认值: 100%
返回值: 字符串,表示元素的 border-image-slice 属性。
CSS 版本 CSS3


相关文章

CSS 参考手册:border-image-slice 属性


Style 对象参考手册 Style 对象

阅读全文
以上是编程学为你收集整理的html border style HTML DOM Style borderImageSlice 属性全部内容。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
相关文章
  • html border style HTML DOM Style emptyCells 属性

    html border style HTML DOM Style emptyCells 属性

    2023-06-04

    Style emptyCells 属性 Style 对象定义和用法emptyCells 属性设置或返回是否显示表格中的空单元格的边框和背景。语法设置 emptyC...

  • htmlstyle属性的用法 HTML DOM Style clear 属性

    htmlstyle属性的用法 HTML DOM Style clear 属性

    2023-06-15

    Style clear 属性 Style 对象定义和用法clear 属性设置或返回元素相对浮动对象的位置。语法设置 clear 属性:Object.style.clear...

  • html div style HTML DOM Style padding 属性

    html div style HTML DOM Style padding 属性

    2023-04-01

    Style padding 属性 Style 对象定义和用法padding 属性设置或返回元素的内边距。该属性可使用 1 到 4 种值:如果规定一种值,比...

  •  OceanBase LPAD

    OceanBase LPAD

    2023-05-25 OceanBase LPAD

    ​LPAD​函数的功能是在字符串​c1​的左边用字符串​c2​填充,直到长度为​n​时为止。语法LPAD(c1,n[,c2])参数参数说明c1...

  •  OceanBase TRANSLATE

    OceanBase TRANSLATE

    2023-04-06 OceanBase TRANSLATE

    ​TRANSLATE​函数将字符表达式值中,指定字符替换为新字符。多字节符(汉字、全角符等),按 1 个字符计算。语法TRANSLATE(c1,c...

© 2024 编程学 bianchengxue.com 版权所有 联系我们
桂ICP备19012293号-7 返回底部