<feBlend>
<feColorMatrix>
<feComponentTransfer>
<feComposite>
<feConvolveMatrix>
<feDiffuseLighting>
<feDisplacementMap>
<feDistantLight>
<feFlood>
<feFuncA>
<feFuncB>
<feFuncG>
<feFuncR>
<feGaussianBlur>
<feImage>
<feMerge>
<feMergeNode>
<feMorphology>
<feOffset>
<fePointLight>
<feSpecularLighting>
<feSpotLight>
<feTile>
<feTurbulence>
<filter>
<font>
<font-face>
<font-face-format>
<font-face-name>
<font-face-src>
<font-face-uri>
<foreignObject>
dx
attribute indicates a shift along the x-axis on the position of an element or its content.
You can use this attribute with the following SVG elements:
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<!-- Lines materialized the position of the glyphs -->
<line x1="0" x2="100%" y1="50%" y2="50%" />
<line x1="10%" x2="10%" y1="0" y2="100%" />
<line x1="60%" x2="60%" y1="0" y2="100%" />
<!-- Some reference text -->
<text x="10%" y="50%" fill="grey">SVG</text>
<!-- The same text with a shift along the x-axis -->
<text dx="50%" x="10%" y="50%">SVG</text>
</svg>
line {
stroke: red;
stroke-width: .5px;
stroke-dasharray: 3px;
}
警告:
As of SVG2
<altGlyph>
is deprecated and shouldn't be used.
For
<altGlyph>
, if it contains a single value,
dx
defines a shift along the x-axis for all alternate glyph.
If there are multiple values,
dx
defines a shift along the x-axis for each individual glyph relative to the preceding glyph. If there are less values than glyphs, the remaining glyphs use a value of
0
. If there are more values than glyphs, extra values are ignored.
| 值 | List of <length> |
|---|---|
| 默认值 | none |
| Animatable | Yes |
For
<feDropShadow>
,
dx
defines the x offset of the dropped shadow. The unit used to resolve the value of the attribute is set by the
primitiveUnits
属性在
<filter>
元素。
| 值 | <number> |
|---|---|
| 默认值 |
2
|
| Animatable | Yes |
For
<feOffset>
,
dx
defines the x offset of the filter input graphic. The unit used to resolve the value of the attribute is set by the
primitiveUnits
属性在
<filter>
元素。
| 值 | <number> |
|---|---|
| 默认值 |
0
|
| Animatable | Yes |
警告:
As of SVG2
<glyphRef>
is deprecated and shouldn't be used.
For
<glyphRef>
,
dx
defines the x offset of the glyph, in the font metric system.
| 值 | <number> |
|---|---|
| 默认值 |
0
|
| Animatable | Yes |
For
<text>
, if it contains a single value,
dx
defines a shift along the x-axis for all glyphs.
If there are multiple values,
dx
defines a shift along the x-axis for each individual glyph relative to the preceding glyph. If there are less values than glyphs, the remaining glyphs use a value of
0
. If there are more values than glyphs, extra values are ignored.
| 值 | List of <length> |
|---|---|
| 默认值 | none |
| Animatable | Yes |
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<!-- Lines materialized the position of the glyphs -->
<line x1="0" x2="100%" y1="25%" y2="25%" />
<line x1="0" x2="100%" y1="50%" y2="50%" />
<line x1="0" x2="100%" y1="75%" y2="75%" />
<line x1="10%" x2="10%" y1="0" y2="100%" />
<line x1="30%" x2="30%" y1="0" y2="100%" />
<line x1="60%" x2="60%" y1="0" y2="100%" />
<!-- Behaviors change based on the number
of values in the attributes -->
<text dx="20%" x="10%" y="25%">SVG</text>
<text dx="0 10%" x="10%" y="50%">SVG</text>
<text dx="0 10% 20%" x="10%" y="75%">SVG</text>
</svg>
line {
stroke: red;
stroke-width: .5px;
stroke-dasharray: 3px;
}
警告:
As of SVG2
<tref>
is deprecated and shouldn't be used.
For
<tref>
, if it contains a single value,
dx
defines a shift along the x-axis for all glyphs.
If there are multiple values,
dx
defines a shift along the x-axis for each individual glyph relative to the preceding glyph. If there are less values than glyphs, the remaining glyphs use a value of
0
. If there are more values than glyphs, extra values are ignored.
| 值 | List of <length> |
|---|---|
| 默认值 | none |
| Animatable | Yes |
For
<tspan>
, if it contains a single value,
dx
defines a shift along the x-axis for all alternate glyph.
If there are multiple values,
dx
defines a shift along the x-axis for each individual glyph relative to the preceding glyph. If there are less values than glyphs, the remaining glyphs use a value of
0
. If there are more values than glyphs, extra values are ignored.
| 值 | List of <length> |
|---|---|
| 默认值 | none |
| Animatable | Yes |
最后修改: , 由 MDN 贡献者