为什么w3c中的SVG元素定义总是具有完整的表示属性?

时间:2014-08-08 10:06:55

标签: svg w3c

最近,我必须深入了解w3c规范,它真的很乱:(当我阅读规范时,我想知道为什么w3c中的SVG元素定义总是具有完整的表示属性?

例如在' mask'元素定义

来自:http://www.w3.org/TR/2011/REC-SVG11-20110816/masking.html#MaskElement

    Attributes:

conditional processing attributes — ‘requiredFeatures’, ‘requiredExtensions’, ‘systemLanguage’
core attributes — ‘id’, ‘xml:base’, ‘xml:lang’, ‘xml:space’
presentation attributes — ‘alignment-baseline’, ‘baseline-shift’, ‘clip’, ‘clip-path’, ‘clip-rule’, ‘color’, ‘color-interpolation’, ‘color-interpolation-filters’, ‘color-profile’, ‘color-rendering’, ‘cursor’, ‘direction’, ‘display’, ‘dominant-baseline’, ‘enable-background’, ‘fill’, ‘fill-opacity’, ‘fill-rule’, ‘filter’, ‘flood-color’, ‘flood-opacity’, ‘font-family’, ‘font-size’, ‘font-size-adjust’, ‘font-stretch’, ‘font-style’, ‘font-variant’, ‘font-weight’, ‘glyph-orientation-horizontal’, ‘glyph-orientation-vertical’, ‘image-rendering’, ‘kerning’, ‘letter-spacing’, ‘lighting-color’, ‘marker-end’, ‘marker-mid’, ‘marker-start’, ‘mask’, ‘opacity’, ‘overflow’, ‘pointer-events’, ‘shape-rendering’, ‘stop-color’, ‘stop-opacity’, ‘stroke’, ‘stroke-dasharray’, ‘stroke-dashoffset’, ‘stroke-linecap’, ‘stroke-linejoin’, ‘stroke-miterlimit’, ‘stroke-opacity’, ‘stroke-width’, ‘text-anchor’, ‘text-decoration’, ‘text-rendering’, ‘unicode-bidi’, ‘visibility’, ‘word-spacing’, ‘writing-mode’
‘class’
‘style’
‘externalResourcesRequired’
‘x’
‘y’
‘width’
‘height’
‘maskUnits’
‘maskContentUnits’

演示文稿属性始终具有完整属性,但其中一些属性已激活,并且有'掩盖'元件!为什么w3c只显示活动属性?

=============================================== =======================

也许问题不清楚,对不起,我的英语非常糟糕:(

我的问题的另一个例子是'flood-color'属性

来自:http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#FloodColorProperty

‘flood-color’
Value:      currentColor |
<color> [<icccolor>] |
inherit
Initial:    black
Applies to:     ‘feFlood’ elements
Inherited:      no
Percentages:    N/A
Media:      visual
Animatable:     yes

你可以看到:&#34; 适用于:'feFlood'元素&#34;但当你看到&#39;掩盖&#39;的所有属性时上面的元素你也看到'泛色'。因此,我想知道“泛色”属性是否与“面具”活跃。元素或仅与&#39; feFlood&#39;元件?如果没有激活&#39;掩码&#39;为什么w3c将它列在&#39; mask&#39;的属性中?元件?

对我的英语再次抱歉。非常感谢!

1 个答案:

答案 0 :(得分:1)

w3c以这种方式编写它是因为他们认为如果所有表示属性都可以放在所有元素上而不管它们是否有任何影响,那么实现者会更容易。