<altGlyph> - SVG: Scalable Vector Graphics 编辑

Deprecated

This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The <altGlyph> SVG element allows sophisticated selection of the glyphs used to render its child character data.

Usage context

CategoriesText content element, Text content child element
Permitted contentAny elements or character data

Attributes

x
This attribute defines the corresponding absolute x-coordinates for rendering the element.
Value type: <list-of-coordinates> ; Default value: Absolute x-coordinate of ancestor <text> or <tspan>; Animatable: yes
y
This attribute defines the corresponding absolute y-coordinates for rendering the element.
Value type: <list-of-coordinates> ; Default value: Absolute y-coordinate of ancestor <text> or <tspan>; Animatable: yes
dx
This attribute indicates a shift along the x-axis on the position of the element.
Value type: <list-of-coordinates> ; Default value: Relative x-coordinate of ancestor <text> or <tspan>; Animatable: yes
dy
This attribute indicates a shift along the x-axis on the position of the element.
Value type: <list-of-coordinates> ; Default value: Relative y-coordinate of ancestor <text> or <tspan>; Animatable: yes
rotate
This attribute defines the supplemental rotation that will be applied to the element.
Value type: <list-of-numbers> ; Default value: none; Animatable: yes (non-additive)
glyphRef
The glyph identifier, the format of which is dependent on the format defined by the format attribute of the given font.
Value type: <string> ; Default value: none; Animatable: no
format
The format of the given font.
Value type: <string> ; Default value: none; Animatable: no
xlink:href
An <iri> reference either to a <glyph> element in an SVG document or to an <altGlyphDef> element.

If the reference is to a <glyph> element and that glyph is available, then that glyph is rendered instead of the character(s) that are inside of the <altGlyph> element.

If the reference is to an <altGlyphDef> element, then if an appropriate set of alternate glyphs is located from processing the <altGlyphDef> element, then those alternate glyphs are rendered instead of the character(s) that are inside of the <altGlyph> element.
Value type: <iri> ; Default value: none; Animatable: no

Global attributes

Core Attributes
Most notably: id lang
Styling Attributes
class, style
Conditional Processing Attributes
Most notably: requiredExtensions, systemLanguage
Event Attributes
Global event attributes, Document element event attributes, Graphical event attributes
Presentation Attributes
Most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility
XLink Attributes
xlink:href, xlink:type, xlink:role, xlink:arcrole, xlink:title, xlink:show, xlink:actuate

DOM Interface

This element implements the SVGAltGlyphElement interface.

Specifications

SpecificationStatusComment
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of '<altGlyph>' in that specification.
RecommendationInitial definition

Browser compatibility

BCD tables only load in the browser

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:149 次

字数:12056

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文