影响其父元素的 SVG 子元素
SVG child elements that affect it's parent
SVG
中的许多元素属性通常在元素内部声明为attributes
或properties
。 F.ex width
和 height
:
<svg width="500" height="300" xmlns="http://www.w3.org/2000/svg">
但是,有些属性可以表示为子元素。这些子元素直接放置在它们所影响的父元素内。这些子元素之一是 title
:
<svg width="500" height="300" xmlns="http://www.w3.org/2000/svg">
<g>
<title>SVG Title Demo example</title>
<rect x="10" y="10" width="200" height="50" />
</g>
</svg>
在这种情况下,title
适用于它的第一个父级 g
。
是否存在像这样影响子元素的所有父元素的列表?
我需要知道何时检查元素的子元素以获得额外的定义。
到目前为止,我发现以下 child elements
会影响他们的 parent:
An element which provides supplementary descriptive information about
its parent.
- desc
- metadata
- title
和:
A filter primitive element is one that can be used as a child of a
filter element to specify a node in the filter graph.
- feBlend
- feColorMatrix
- feComponentTransfer
- feComposite
- feConvolveMatrix
- feDiffuseLighting
- feDisplacementMap
- feFlood
- feGaussianBlur
- feImage
- feMerge
- feMorphology
- feOffset
- feSpecularLighting
- feTile
- feTurbulence
SVG
中的许多元素属性通常在元素内部声明为attributes
或properties
。 F.ex width
和 height
:
<svg width="500" height="300" xmlns="http://www.w3.org/2000/svg">
但是,有些属性可以表示为子元素。这些子元素直接放置在它们所影响的父元素内。这些子元素之一是 title
:
<svg width="500" height="300" xmlns="http://www.w3.org/2000/svg">
<g>
<title>SVG Title Demo example</title>
<rect x="10" y="10" width="200" height="50" />
</g>
</svg>
在这种情况下,title
适用于它的第一个父级 g
。
是否存在像这样影响子元素的所有父元素的列表?
我需要知道何时检查元素的子元素以获得额外的定义。
到目前为止,我发现以下 child elements
会影响他们的 parent:
An element which provides supplementary descriptive information about its parent.
- desc
- metadata
- title
和:
A filter primitive element is one that can be used as a child of a filter element to specify a node in the filter graph.
- feBlend
- feColorMatrix
- feComponentTransfer
- feComposite
- feConvolveMatrix
- feDiffuseLighting
- feDisplacementMap
- feFlood
- feGaussianBlur
- feImage
- feMerge
- feMorphology
- feOffset
- feSpecularLighting
- feTile
- feTurbulence