非常教程

SVG参考手册

属性 | Attributes

writing-mode(写作模式)

writing-mode属性指定<text>元素的初始内联进程方向是从左到右,从右到左还是从上到下。该writing-mode属性仅适用于<text>元素; 该属性被用于忽略<tspan><tref><altGlyph><textPath>子元素。(请注意,<text>由于Unicode双向算法和属性direction,内联进程方向可以在元素内更改unicode-bidi

作为一个表现属性,它也可以作为一个属性直接在一个CSS样式表,请参阅css writing-mode进一步的信息

使用上下文

Categories

Presentation attribute

Value

lr-tb | rl-tb | tb-rl | lr | rl | tb | inherit

Animatable

Yes

Normative document

SVG 1.1 (2nd Edition)

lr-tb | lr将最初的内联进程方向设置为从左到右,这在大多数基于拉丁语的文档中都是常见的。对于大多数字符,在每个字形呈现后,当前文本位置从左向右前进.rl-tb | rl将最初的内联进程方向设置为从右到左,这在阿拉伯语或希伯来语脚本中很常见.tb-rl | tb首先将内联进程方向设置为从上到下,这在一些亚洲脚本(如中文和日文)中很常见。虽然没有水平那么频繁,但这种类型的垂直布局也出现在基于拉丁文的文档中,特别是在表格列或行标签中。在大多数情况下,贯穿每个字形中间的垂直基线是对齐的。

示例

元素

以下元素可以使用writing-mode属性

  • <text>See also
  • CSS version: writing-mode

属性 | Attributes相关

1.accent-height(焦点高度)
2.accumulate(积累)
3.additive
4.alignment-baseline(对齐基线)
5.ascent
6.attributename(属性名字)
7.Attributes(属性)
8.attributetype(属性类型)
9.azimuth(方位)
10.basefrequency
11.baseline-shift(基线漂移)
12.baseprofile
13.begin(开始)
14.bias(偏压)
15.calcmode
16.class
17.clip(剪辑)
18.clip-path(剪辑路径)
19.clip-rule(剪辑规则)
20.clippathunits
21.color(颜色)
22.color-interpolation(彩色插值)
23.color-interpolation-filters(色彩插值滤波器)
24.color-profile(彩色轮廓)
25.color-rendering(显色)
26.contentscripttype
27.contentstyletype
28.cursor(光标)
29.cx
30.cy
31.d
32.diffuseconstant
33.direction(方向)
34.display(显示)
35.divisor
36.dominant-baseline(显性基线)
37.dur
38.dx
39.dy
40.edgemode
41.elevation
42.end
43.externalresourcesrequired
44.fill
45.fill-opacity
46.fill-rule
47.filter
48.filterres
49.filterunits
50.flood-color
51.flood-opacity
52.font-family
53.font-size
54.font-size-adjust
55.font-stretch
56.font-style
57.font-variant
58.font-weight
59.fr
60.from
61.fx
62.fy
63.gradienttransform
64.gradientunits
65.height
66.href
67.image-rendering
68.in
69.in2
70.k1
71.k2
72.k3
73.k4
74.kernelmatrix
75.kernelunitlength
76.kerning
77.keysplines
78.keytimes
79.lengthadjust
80.letter-spacing
81.lighting-color
82.limitingconeangle
83.local
84.marker-end
85.marker-mid
86.marker-start
87.markerheight
88.markerunits
89.markerwidth
90.mask
91.maskcontentunits
92.maskunits
93.max
94.min
95.mode
96.numoctaves
97.opacity
98.operator
99.order
100.overflow
SVG

可缩放矢量图形是基于可扩展标记语言(标准通用标记语言的子集),用于描述二维矢量图形的一种图形格式。它由万维网联盟制定,是一个开放标准。