附录 H:特性索引

本附录为信息性内容,而非规范性内容。

名称 初始值 应用到 继承 百分比 媒体 动画 计算值
alignment-baseline auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical 见属性描述 tspan, textPath 元素 N/A 视觉 按指定
baseline-shift baseline | sub | super | <percentage> | <length> baseline tspan, textPath 元素 参考 text 元素的“行高”, 对于 SVG 定义等于字体大小 视觉 绝对长度、百分比或指定关键字
color <color> 取决于用户代理 应用于 fill, stroke, stop-color, flood-color, lighting-color 属性的元素 N/A 视觉 一个 RGBA 颜色
color-interpolation auto | sRGB | linearRGB sRGB 容器元素, 图形元素, 渐变元素, useanimate 元素 N/A 视觉 按指定
color-rendering auto | optimizeSpeed | optimizeQuality auto 容器元素, 图形元素, 渐变元素, useanimate 元素 N/A 视觉 按指定
direction ltr | rtl ltr 文本内容元素 N/A 视觉 按指定
display inline | block | list-item | run-in | compact | marker | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | none inline svg, g, switch, a, foreignObject, use图形元素 N/A 所有
dominant-baseline auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge auto 文本内容元素 N/A 视觉 按指定
fill <paint> (参见 指定 paint) 黑色 形状文本 内容元素 N/A 视觉 按指定,但 <color> 值会被计算 并且 <url> 值会被转化为绝对路径
fill-opacity <alpha-value> 1 形状文本 内容元素 N/A 视觉 指定值被转换为数字,限制在 [0,1] 范围内
fill-rule nonzero | evenodd nonzero 形状文本 内容元素 N/A 视觉 按指定
font-variant normal | small-caps normal 文本内容元素 N/A 视觉 参见个别属性
glyph-orientation-vertical auto | <angle> | <number> auto 文本内容元素 N/A 视觉 按指定
image-rendering auto | optimizeSpeed | optimizeQuality auto 图像 N/A 视觉 按指定
line-height normal | <number> | <length-percentage> normal text 元素 参考元素本身的字体大小 视觉 对于 <length-percentage> 是绝对值; 否则按指定
marker 参见个别属性 参见个别属性 形状 N/A 视觉 参见个别属性
marker-end
marker-mid
marker-start
none | <url> none 形状 N/A 视觉 按指定,但其中的 <url> 值(作为 <marker-ref> 的一部分)会被转化为绝对路径
opacity <alpha-value> 1 svg, g, symbol, marker, a, switch, use, unknown 元素 和 图形元素 N/A 视觉 指定值被转换为数字,限制在 [0,1] 范围内
overflow visible | hidden | scroll | auto 见正文 创建新SVG视口的元素, pattern 元素 和 marker 元素 N/A 视觉 按指定
paint-order normal | [ fill || stroke || markers ] normal 形状文本 内容元素 N/A 视觉 按指定
pointer-events bounding-box | visiblePainted | visibleFill | visibleStroke | visible |
painted | fill | stroke | all | none
visiblePainted 容器元素, 图形元素use N/A 视觉 按指定
shape-rendering auto | optimizeSpeed | crispEdges |
geometricPrecision
auto 形状 N/A 视觉 按指定
stop-color currentColor |
<color> [<icccolor>]
黑色 stop 元素 N/A 视觉
stop-opacity <alpha-value> 1 stop 元素 N/A 视觉
stroke <paint> (参见 指定 paint) none 形状文本 内容元素 N/A 视觉 按指定,但 <color> 值会被计算 并且 <url> 值会被转化为绝对路径
stroke-dasharray none | <dasharray> none 形状文本 内容元素 N/A 视觉 是 [1] 绝对长度或百分比用于 <dasharray>,或者指定的关键字
stroke-dashoffset <length-percentage> 0 形状文本 内容元素 参考当前 SVG 视口的大小 视觉 绝对长度或百分比
stroke-linecap butt | round | square butt 形状文本 内容元素 N/A 视觉 按指定
stroke-linejoin miter | round | bevel miter 形状文本 内容元素 N/A 视觉 按指定
stroke-miterlimit <number> (非负数) 4 形状文本 内容元素 N/A 视觉 按指定
stroke-opacity <alpha-value> 1 形状文本 内容元素 N/A 视觉 指定值被转换为数字,限制在 [0,1] 范围内
stroke-width <length-percentage> 1 形状文本 内容元素 参考当前 SVG 视口的大小 视觉 绝对长度或百分比
text-anchor start | middle | end start 文本内容元素 N/A 视觉 按指定
text-decoration none | [ underline || overline || line-through || blink ] none 文本内容元素 否 (见正文) N/A 视觉 参见个别属性
text-rendering auto | optimizeSpeed | optimizeLegibility |
geometricPrecision
auto text 元素 N/A 视觉 按指定
vector-effect non-scaling-stroke | none none 图形元素use N/A 视觉 按指定
visibility visible | hidden | collapse visible 图形元素, usea 元素 当它是 文本内容元素 的子元素时 N/A 视觉 按指定
white-space normal | pre | nowrap | pre-wrap | pre-line normal 文本内容元素 N/A 视觉 按指定
writing-mode lr-tb | rl-tb | tb-rl | lr | rl | tb lr-tb text 元素 N/A 视觉 按指定
  1. [1] 字体, 字体大小调整虚线数组 属性是可动画的,但不支持加法动画。