CSS clip property
Description of property definition and use
What happens if the image is larger than the element that contains it? -clip property, which lets you specify an absolutely positioned element that should be visible, and the element is clipped to this shape and displayed.
Note: If you have "overflow:visible" first, the clip property does not work.
Default: | auto |
---|---|
Inherited: | no |
Version: | CSS2 |
JavaScript syntax: | object .style.clip="rect(0px,50px,50px,0px)" |
Browser support
The numbers in the table support the first browser version number of the property.
Attributes | |||||
---|---|---|---|---|---|
clip | 1.0 | 8.0 | 1.0 | 1.0 | 7.0 |
The property value
value | describe |
---|---|
shape | Set the shape of an element.The only legal shape value is: RECT ( top , right , bottom , left ) |
auto | Defaults.No cut is applied. |
inherit | The value of the CLIP attribute should be inherited from the parent element. |
Related articles
CSS tutorial: CSS Positioning