【发布时间】:2018-08-23 12:31:21
【问题描述】:
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。
是否存在像这样影响子元素的所有父元素的列表?
我需要知道何时检查元素的子元素是否有其他定义。
【问题讨论】:
标签: svg properties attributes parent-child elements