Style clip Property
The Style object
Definition and Usage
The clip property sets or returns the visible portion of a positioned element.
Syntax
Set the clip property:
Object.style.clip="auto|rect(
top right bottom left
)|inherit"
Return the clip property:
Object.style.clip
| Value | Description |
|---|---|
| auto | Default. The element is not clipped. |
| rect(top right bottom left) | The clipped shape is defined by four coordinates. |
| inherit | The value of the clip property is inherited from the parent element. |
Browser support





All major browsers support the clip property.
**Note:** IE7 and earlier versions do not support the "inherit" value. IE8 supports "inherit" only if a !DOCTYPE is specified. IE9 supports "inherit".
Example
Example
Clip an image to a specified shape:
Try it »
The Style object