The overflow
attribute has the same parameter values as defined for the css overflow property
. However, the following additional points apply:
overflow
attribute only applies to elements that establish new viewports (see below), <pattern>
elements and <marker>
elements. For all other elements, the property has no effect.overflow
attribute can apply, if the overflow
attribute has the value hidden
or scroll
, the effect is that a new clipping path in the shape of a rectangle is created. The result is equivalent to defining a <clipPath>
element whose content is a <rect>
element which defines the equivalent rectangle, and then specifying the <uri> of this <clipPath>
element on the clip-path
attribute for the given element.overflow
attribute has a value other than hidden
or scroll
, the property has no effect.auto
is equivalent to the value visible
.overflow
attribute has the value hidden
or scroll
, then the browser will establish an initial clipping path equal to the bounds of the initial viewport; otherwise, the initial clipping path is set according to the CSS clipping rules.overflow
attribute on the outermost svg element is ignored for the purposes of visual rendering and the initial clipping path is set to the bounds of the initial viewport.overflow
as defined in CSS is visible
, and this applies also to the root <svg>
element; however, for child elements of an SVG document, SVG's browser style sheet overrides this initial value and sets the overflow
attribute on elements that establish new viewports, ‘pattern’ elements and ‘marker’ elements to the value hidden
.As a presentation attribute, it also can be used as a property directly inside a CSS stylesheet, see css overflow
for further information.
Categories | Presentation attribute |
---|---|
Value | visible | hidden | scroll | auto | inherit |
Animatable | Yes |
Normative document | SVG 1.1 (2nd Edition) |
The following elements can use the overflow
attribute
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/overflow