height - SVG: Scalable Vector Graphics 编辑

The height attribute defines the vertical length of an element in the user coordinate system.

Twenty five elements are using this attribute: <feBlend>, <feColorMatrix>, <feComponentTransfer>, <feComposite>, <feConvolveMatrix>, <feDiffuseLighting>, <feDisplacementMap>, <feDropShadow>, <feFlood>, <feGaussianBlur>, <feImage>, <feMerge>, <feMorphology>, <feOffset>, <feSpecularLighting>, <feTile>, <feTurbulence>, <filter>, <foreignObject>, <image>, <mask>, <pattern>, <rect>, <svg>, and <use>

html,body,svg { height:100% }
<svg viewBox="0 0 300 100" xmlns="http://www.w3.org/2000/svg">
  <!-- With a height of 0 or less, nothing will be rendered -->
  <rect y="0" x="0" width="90" height="0"/>
  <rect y="0" x="100" width="90" height="60"/>
  <rect y="0" x="200" width="90" height="100%"/>
</svg>

feBlend

For <feBlend>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feColorMatrix

For <feColorMatrix>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feComponentTransfer

For <feComponentTransfer>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feComposite

For <feComposite>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feConvolveMatrix

For <feConvolveMatrix>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feDiffuseLighting

For <feDiffuseLighting>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feDisplacementMap

For <feDisplacementMap>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feDropShadow

For <feDropShadow>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feFlood

For <feFlood>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feGaussianBlur

For <feGaussianBlur>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feImage

For <feImage>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feMerge

For <feMerge>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feMorphology

For <feMorphology>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feOffset

For <feOffset>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feSpecularLighting

For <feSpecularLighting>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feTile

For <feTile>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

feTurbulence

For <feTurbulence>, height defines the vertical length for the rendering area of the primitive.

Value<length> | <percentage>
Default value100%
AnimatableYes

filter

For <filter>, height defines the vertical length for the rendering area of the filter.

Value<length> | <percentage>
Default value120%
AnimatableYes

foreignObject

For <foreignObject>, height defines the vertical length for the rendering area for the referenced document.

Valueauto | <length> | <percentage>
Default valueauto (treated as 0)
AnimatableYes

Note: Starting with SVG2, height is a Geometry Property meaning this attribute can also be used as a CSS property for <foreignObject>.

image

For <image>, height defines the vertical length for the image.

Valueauto | <length> | <percentage>
Default valueauto (treated as the intrinsic height of the image)
AnimatableYes

Note: Starting with SVG2, height is a Geometry Property meaning this attribute can also be used as a CSS property for images.

mask

For <mask>, height defines the vertical length of its area of effect. The exact effect of this attribute is influenced by the maskUnits attribute.

Value<length> | <percentage>
Default value120%
AnimatableYes

pattern

For <pattern>, height defines the vertical length of the tile pattern. The exact effect of this attribute is influenced by the patternUnits and patternTransform attributes.

Value<length>
Default value0
AnimatableYes

rect

For <rect>, height defines the vertical length for the rectangle.

Valueauto | <length> | <percentage>
Default valueauto (treated as 0)
AnimatableYes

Note: Starting with SVG2, height is a Geometry Property meaning this attribute can also be used as a CSS property for rectangles.

svg

For <svg>, height defines the vertical length for the rendering area of the SVG viewport.

Note: In an HTML document if both the viewBox and height attributes are omitted, the svg element will be rendered with a height of 150px

Valueauto | <length> | <percentage>
Default valueauto (treated as 100%)
AnimatableYes

Note: Starting with SVG2, height is a Geometry Property meaning this attribute can also be used as a CSS property for <svg>.

use

For <use>, height defines the vertical length for the referenced element.

Valueauto | <length> | <percentage>
Default valueauto (treated as 0)
AnimatableYes

Note:  heighthas no effect on use elements, unless the element referenced has a viewbox - i.e. they only have an effect when use refers to a svg or symbol element.

Note: Starting with SVG2, height is a Geometry Property meaning this attribute can also be used as a CSS property for used elements.

Specifications

SpecificationStatusComment
Filter Effects Module Level 1
The definition of 'height' in that specification.
Working DraftDefinition for <filter>
Filter Effects Module Level 1
The definition of 'height' in that specification.
Working DraftDefinition for filter primitives
CSS Masking Module Level 1
The definition of 'height' in that specification.
Candidate RecommendationDefinition for <mask>
Scalable Vector Graphics (SVG) 2
The definition of 'height' in that specification.
Candidate RecommendationDefinition as a geometry property
Scalable Vector Graphics (SVG) 2
The definition of 'height' in that specification.
Candidate RecommendationDefinition for <pattern>
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'height' in that specification.
RecommendationInitial definition for <foreignObject>
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'height' in that specification.
RecommendationInitial definition for <pattern>
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'height' in that specification.
RecommendationInitial definition for <image>
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'height' in that specification.
RecommendationInitial definition for <svg>
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'height' in that specification.
RecommendationInitial definition for <use>
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'height' in that specification.
RecommendationInitial definition for <filter>
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'height' in that specification.
RecommendationInitial definition for filter primitives
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'height' in that specification.
RecommendationInitial definition for <mask>
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of 'height' in that specification.
RecommendationInitial definition for <rect>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:48 次

字数:28317

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文