首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么w3c中的SVG元素定义总是有完整的表示属性?

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

Stack Overflow用户
提问于 2014-08-08 10:06:54
回答 1查看 73关注 0票数 0

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

例如,在“掩码”元素定义中

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

代码语言:javascript
复制
    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

代码语言:javascript
复制
‘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会将其列在“掩码”元素的属性中?

再次为我的英语道歉。非常感谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-08 11:20:34

w3c是这样写的,因为他们认为,如果所有表示属性都可以放在所有元素上,不管它们是否有任何效果,对实现者来说就更容易了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25200961

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档