The clip property specifies what portion of an element is visible. The clip property applies only to elements with position:absolute.

  • Initial valueauto
  • Applies toAbsolutely positioned elements
  • InheritedNo
  • MediaVisual
  • Computed value'auto' if specified as 'auto', otherwise a rectangle with four values, each of which is 'auto' if specified as 'auto' and the computed length otherwise
  • AnimatableYes
  • CSS VersionCSS2, CSS3
  • JavaScript syntaxobject.style.clip
Formal syntax: auto | <shape>

clip: auto;
clip: <shape>;
<shape> = rect(<top>, <right>, <bottom>, <left>)
  • autoThe element does not clip.
  • <shape>Each of the arguments <top> and <bottom> specify offsets from the top border edge of the box, and <right>, and <left> specify offsets from the left border edge of the box. Authors should separate offset values with commas. <top>, <right>,<bottom>, and <left> may either have a <length> value or 'auto'. Negative lengths are permitted.
  • inherit
.class {
   clip: rect(10px, 20px, 10px, 20px;)
}
1+Firefox8+Explorer1+Chrome1+Safari8+Opera


Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.