overflow-clip-margin
Quick Summary for overflow-clip-margin
The
overflow-clip-margin
CSS property determines how far outside its bounds an element with overflow: clip
may be painted before being clipped.
Code Usage for overflow-clip-margin
overflow-clip-margin: 20px; overflow-clip-margin: 1em; /* Global values */ overflow-clip-margin: inherit; overflow-clip-margin: initial; overflow-clip-margin: revert; overflow-clip-margin: unset;
More Details for overflow-clip-margin
overflow-clip-margin
The overflow-clip-margin
CSS property determines how far outside its bounds an element with overflow: clip
may be painted before being clipped.
Syntax
overflow-clip-margin: 20px; overflow-clip-margin: 1em; /* Global values */ overflow-clip-margin: inherit; overflow-clip-margin: initial; overflow-clip-margin: revert; overflow-clip-margin: unset;
The overflow-clip-margin
property is specified as a length, negative values are not allowed.
Note: If the element does not have overflow: clip
then this property will be ignored.
Formal definition
Initial value | 0px |
---|---|
Applies to | all elements |
Inherited | no |
Computed value | the computed |
Animation type | discrete |
Formal syntax
<visual-box> || <length [0,∞]>where
<visual-box> = content-box | padding-box | border-box
Examples
HTML
<div class="box"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. </div>
CSS
.box { border: 3px solid black; width: 250px; height: 100px; overflow: clip; overflow-clip-margin: 20px; }
Result
Specifications
Specification |
---|
CSS Overflow Module Level 3 # overflow-clip-margin |
See also
Related CSS properties:text-overflow
, white-space
, overflow
, overflow-inline
, overflow-x
, overflow-y
, clip
, display
Last modified: Aug 12, 2021, by MDN contributors
Select your preferred language English (US)日本語 Change language Posted in
12:22 am, February 22, 2022
Add Comment
Other Items in CSS
rgb()
rgba()
:right
right
@right-bottom
:root
rotate
rotate()
rotate3d()
rotateX()
rotateY()
rotateZ()
row-gap
ruby-align
ruby-position
saturate()
scale
scale()
scale3d()
scaleX()
scaleY()
scaleZ()
:scope
scroll-behavior
scroll-margin
scroll-margin-block
scroll-margin-block-end
scroll-margin-block-start
scroll-margin-bottom
scroll-margin-inline
scroll-margin-inline-end
scroll-margin-inline-start
scroll-margin-left
scroll-margin-right
scroll-margin-top
scroll-padding
scroll-padding-block
scroll-padding-block-end
scroll-padding-block-start
scroll-padding-bottom
scroll-padding-inline
scroll-padding-inline-end
scroll-padding-inline-start
scroll-padding-left
scroll-padding-right
scroll-padding-top
scroll-snap-align
scroll-snap-stop
scroll-snap-type
@scroll-timeline