非常教程

SVG参考手册

属性 | Attributes

paint-order

paint-order属性指定给定形状或文本元素的填充,描边和标记被绘制的顺序。它的默认值是normal,这表示先填充,然后是笔画,最后是标记。

要指定不同的顺序,可以使用以空格分隔的关键字fillstrokemarkers的列表。如果三个绘画组件中的任何一个被省略,那么将在指定的组件之后以默认顺序绘制它们。例如,使用stroke相当于笔画填充标记

作为一个表现属性,它也可以直接在CSS样式表中作为属性使用。

用法说明

分类

呈现属性

正常| fill || 笔画|| 标记| 继承

动画

规范性文件

SVG 2

例子

<svg xmlns="http://www.w3.org/2000/svg" width="400" height="200">
  <linearGradient id="g" x1="0" y1="0" x2="0" y2="1">
    <stop stop-color="#888"/>
    <stop stop-color="#ccc" offset="1"/>
  </linearGradient>
  <rect width="400" height="200" fill="url(#g)"/>
  <g fill="crimson" stroke="white" stroke-width="6" stroke-linejoin="round"
     text-anchor="middle" font-family="sans-serif" font-size="50px" font-weight="bold">
    <text x="200" y="75">stroke over</text>
    <text x="200" y="150" paint-order="stroke">stroke under</text>
  </g>
</svg>

这个例子将呈现如下:

paint-order

元素

以下元素可以使用该paint-order属性:

  • Shape elements »
  • Text content elements »

浏览器兼容性

Feature

Firefox (Gecko)

Chrome

Internet Explorer

Opera

Safari

Basic support

(Yes)

(Yes)

No support

(Yes)

(Yes)

Feature

Firefox Mobile (Gecko)

Android

IE Phone

Opera Mobile

Safari Mobile

Basic support

?

No support

No support

No support

No support

属性 | 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

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