From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../web/svg/attribute/baseline-shift/index.html | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 files/zh-cn/web/svg/attribute/baseline-shift/index.html (limited to 'files/zh-cn/web/svg/attribute/baseline-shift') diff --git a/files/zh-cn/web/svg/attribute/baseline-shift/index.html b/files/zh-cn/web/svg/attribute/baseline-shift/index.html new file mode 100644 index 0000000000..b8f1c8f5f5 --- /dev/null +++ b/files/zh-cn/web/svg/attribute/baseline-shift/index.html @@ -0,0 +1,69 @@ +--- +title: baseline-shift +slug: Web/SVG/Attribute/baseline-shift +tags: + - SVG + - SVG属性 + - 需要兼容性表 +translation_of: Web/SVG/Attribute/baseline-shift +--- +

« SVG属性参考主页

+ +

属性baseline-shift允许相对于父文本内容元素的dominant-baseline重定位dominant-baseline。该切换对象必须是一个下标或上标。

+ +

作为一个外观属性,它还可以直接作为CSS样式表内部的属性使用。请看{{ cssxref("baseline-shift","CSS baseline-shift") }}以了解更多信息。

+ +

用法

+ + + + + + + + + + + + + + + + + + + + +
类别外观属性
auto | baseline | super | sub | <percentage> | <length> | inherit
可变性Yes
规范文档SVG 1.1 (2nd Edition)
+ +
+
baseline
+
没有基线切换,dominant-baseline依然在原来的位置。
+
sub
+
dominant-baseline切换到下标的默认位置。
+
super
+
dominant-baseline切换到上标的默认位置
+
<percentage>
+
该属性的结果值是这个百分数乘以 {{ SVGElement("text") }}元素的{{ SVGAttr("line-height") }}。如果是正值,dominant-baseline向shift同方向移动结果值;如果是负值,dominant-baseline向shift反方向移动结果值,相对于父文本内容元素。值“0%”等于”baseline“。
+
<length>
+
如果是正值,dominant-baseline向shift同方向移动<length>距离;如果是负值,dominant-baseline向shift反方向移动<length>距离。值”0cm“等于”baseline“。
+
+ +

示例

+ +

元素

+ +

下列这些元素可以使用baseline-shift属性。

+ + + +

参见

+ + -- cgit v1.2.3-54-g00ecf