baseline-shift

baseline-shift

The baseline-shift attribute allows repositioning of the dominant-baseline relative to the dominant-baseline of the parent text content element. The shifted object might be a sub- or superscript.

As a presentation attribute, it also can be used as a property directly inside a CSS stylesheet, see css baseline-shift for further information.

Usage context

Categories Presentation attribute
Value auto | baseline | super | sub | <percentage> | <length> | inherit
Animatable Yes
Normative document SVG 1.1 (2nd Edition)
baseline
There is no baseline shift; the dominant-baseline remains in its original position.
sub
The dominant-baseline is shifted to the default position for subscripts.
super
The dominant-baseline is shifted to the default position for superscripts.
<percentage>
The resulting value of the property is this percentage multiplied by the line-height of the <text> element. The dominant-baseline is shifted in the shift direction (positive value) or opposite to the shift direction (negative value) of the parent text content element by the resulting value. A value of "0%" is equivalent to "baseline".
<length>
The dominant-baseline is shifted in the shift direction (positive value) or opposite to the shift direction (negative value) of the parent text content element by the <length> value. A value of "0cm" is equivalent to "baseline".

Example

TBD

Elements

The following elements can use the baseline-shift attribute

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseline-shift

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部