最近,我不得不深入研究w3c规范,它真的很混乱:(当我阅读规范时,我想知道为什么w3c中的SVG元素定义总是有完整的表示属性?
例如,在“掩码”元素定义中
来自: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只显示active属性?
======================================================================
也许问题还不清楚,对不起,我的英语真的很差。
我的问题的另一个例子是“泛彩色”属性。
来自: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您可以看到:“应用于:‘feFlood’元素”,但是当您在上面看到‘掩码’元素的所有属性时,您还会看到‘洪水色’。所以我想知道‘洪水色’属性是用‘掩码’元素激活的,还是只在'feFlood‘元素中激活?如果没有激活“掩码”,为什么w3c会将其列在“掩码”元素的属性中?
再次为我的英语道歉。非常感谢!
发布于 2014-08-08 11:20:34
w3c是这样写的,因为他们认为,如果所有表示属性都可以放在所有元素上,不管它们是否有任何效果,对实现者来说就更容易了。
https://stackoverflow.com/questions/25200961
复制相似问题