Specifies which part of a positioned element is visible.
A positioned element is an element whose position property is set to relative, absolute or fixed. This property only works for absolute or fixed positioned elements.
You can set the top, right, bottom, and left coordinates of the visible region with this property, relative to the upper-left corner of the element.
- The value of top defines a line, content above this line will be hidden.
- The value of bottom defines a line, content below this line will be hidden.
- The value of left defines a line, content left of this line will be hidden.
- The value of right defines a line, content right of this line will be hidden.
One of the following values:
|Default. The element does not clip.|
|Takes the value of this property from the computed style of the parent element.|
|Clips the shape defined by the four coordinates (top right bottom left).|
Example HTML code 1:
This example illustrates the use of the clip property:
Did you find this example helpful?
Supported by tags:
User Contributed Comments