<形状> | <shape>
弃用
该功能已从Web标准中删除。尽管一些浏览器可能仍然支持,但它正在被丢弃。避免使用它并尽可能更新现有的代码; 请参阅本页面底部的兼容性表格来指导您的决定。请注意,此功能可能随时停止工作。
<shape>
CSS数据类型定义的区域的具体形式(形状)。该区域确定给定属性所clip
应用的元素的一部分。
此数据类型已被弃用,以支持<basic-shape>
。
语法
A <shape>
用该rect()
函数定义。的rect()
函数表示法中的矩形的形式产生的区域。
rect()
rect(top, right, bottom, left)
值

_top_是<length>
表示矩形顶部相对于元素框顶部边界<length>
的偏移量.
_right_ 是表示矩形右侧相对于元素框左边界<length>
的偏移量.
_bottom_ 表示底部偏移量的a 相对于元素框的顶部边界的矩形.
_left_ <length>
表示矩形左侧相对于元素框的左侧边界的偏移量。
插值
<shape>
为了允许动画,可以内插矩形的CSS数据类型的值。在这种情况下,它们插在他们的top
,right
,bottom
,和left
组件,每个组件当作一个真正的浮点数。内插的速度由与动画相关的定时功能决定。
例子
img.clip04 {
clip: rect(10px, 20px, 20px, 10px);
}
规范
Specification | Status | Comment |
---|---|---|
CSS Level 2 (Revision 1)The definition of '<shape>' in that specification. | Recommendation | Defined with the clip property. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 1.0 | 1.0 (1.7 or earlier) | 5.51 | 9.5 | 1.3 |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | ? | ? | ? | ? | ? |
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com