A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/y below:

y - SVG | MDN

y

The y attribute defines a y-axis coordinate in the user coordinate system.

Elements

You can use this attribute with the SVG elements described in the sections below.

<feBlend>

For <feBlend>, y defines the minimum y coordinate for the rendering area of the primitive.

<feColorMatrix>

For <feColorMatrix>, y defines the minimum y coordinate for the rendering area of the primitive.

<feComponentTransfer>

For <feComponentTransfer>, y defines the minimum y coordinate for the rendering area of the primitive.

<feComposite>

For <feComposite>, y defines the minimum y coordinate for the rendering area of the primitive.

<feConvolveMatrix>

For <feConvolveMatrix>, y defines the minimum y coordinate for the rendering area of the primitive.

<feDiffuseLighting>

For <feDiffuseLighting>, y defines the minimum y coordinate for the rendering area of the primitive.

<feDisplacementMap>

For <feDisplacementMap>, y defines the minimum y coordinate for the rendering area of the primitive.

<feDropShadow>

For <feDropShadow>, y defines the minimum y coordinate for the rendering area of the primitive.

<feFlood>

For <feFlood>, y defines the minimum y coordinate for the rendering area of the primitive.

<feFuncA>

For <feFuncA>, y defines the minimum y coordinate for the rendering area of the primitive.

<feFuncB>

For <feFuncB>, y defines the minimum y coordinate for the rendering area of the primitive.

<feFuncG>

For <feFuncG>, y defines the minimum y coordinate for the rendering area of the primitive.

<feFuncR>

For <feFuncR>, y defines the minimum y coordinate for the rendering area of the primitive.

<feGaussianBlur>

For <feGaussianBlur>, y defines the minimum y coordinate for the rendering area of the primitive.

<feImage>

For <feImage>, y defines the minimum y coordinate for the rendering area of the primitive.

<feMerge>

For <feMerge>, y defines the minimum y coordinate for the rendering area of the primitive.

<feMergeNode>

For <feMergeNode>, y defines the minimum y coordinate for the rendering area of the primitive.

<feMorphology>

For <feMorphology>, y defines the minimum y coordinate for the rendering area of the primitive.

<feOffset>

For <feOffset>, y defines the minimum y coordinate for the rendering area of the primitive.

<fePointLight>

For <fePointLight>, y defines the y location for the light source in the coordinate system defined by the primitiveUnits attribute on the <filter> element.

Value <number> Default value 0 Animatable Yes <feSpecularLighting>

For <feSpecularLighting>, y defines the minimum y coordinate for the rendering area of the primitive.

<feSpotLight>

For <feSpotLight>, y defines the y location for the light source in the coordinate system defined by the primitiveUnits attribute on the <filter> element.

Value <number> Default value 0 Animatable Yes <feTile>

For <feTile>, y defines the minimum y coordinate for the rendering area of the primitive.

<feTurbulence>

For <feTurbulence>, y defines the minimum y coordinate for the rendering area of the primitive.

<filter>

For <filter>, y defines the y coordinate of the upper left corner for the rendering area of the filter.

<foreignObject>

For <foreignObject>, y defines the y coordinate of the upper left corner of its viewport.

Note: The y-axis coordinate of the <foreignObject> can also be defined with the y geometry property. If set in CSS, the y property value overrides the y attribute value.

<image>

For <image>, y defines the y coordinate of the upper left corner of the image.

Note: The y-axis coordinate of the <image> can also be defined with the y geometry property. If set in CSS, the y property value overrides the y attribute value.

<mask>

For <mask>, y defines the y coordinate of the upper left corner of its area of effect. The exact effect of this attribute is influenced by the maskUnits attribute.

<pattern>

For <pattern>, y defines the y coordinate of the upper left corner of the tile pattern. The exact effect of this attribute is influenced by the patternUnits and patternTransform attributes.

Value <length> Default value 0 Animatable Yes <rect>

For <rect>, y defines the y coordinate of the upper left corner of the shape.

Note: The y-axis coordinate of the <rect> can also be defined with the y geometry property. If set in CSS, the y property value overrides the y attribute value.

<svg>

For <svg>, y defines the y coordinate of the upper left corner of its viewport.

Note: The y-axis coordinate of the <svg> can also be defined with the y geometry property. If set in CSS, the y property value overrides the y attribute value.

<text>

For <text>, if it contains a single value, y defines the y coordinate where the content text position must be placed. The content text position is usually a point on the baseline of the first line of text. The exact content text position is influenced by other properties, such as text-anchor or direction.

If it contains multiple values, y defines the y coordinate of each individual glyph from the text. If there are fewer values than glyphs, the remaining glyphs are placed in line with the last positioned glyph. If there are more values than glyphs, the extra values are ignored.

html,
body,
svg {
  height: 100%;
}
<svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
  <!-- horizontal line to materialized the text base line -->
  <line x1="0" y1="40%" x2="100%" y2="40%" />
  <line x1="0" y1="60%" x2="100%" y2="60%" />
  <line x1="0" y1="80%" x2="100%" y2="80%" />

  <!-- vertical line to materialized the x positioning -->
  <line x1="5%" y1="0" x2="5%" y2="100%" />
  <line x1="55%" y1="0" x2="55%" y2="100%" />

  <!-- y with a single value -->
  <text y="40%" x="5%">SVG</text>

  <!-- y with multiple values -->
  <text y="40%,60%,80%" x="55%">SVG</text>
</svg>
text {
  font: 40px sans-serif;
}

line {
  fill: none;
  stroke: red;
  stroke-width: 0.5px;
  stroke-dasharray: 2px;
}
<tspan>

For <tspan>, if it contains a single value, y defines the y coordinate where the content text position must be placed. The content text position is usually a point on the baseline of the first line of text. The exact content text position is influenced by other properties, such as text-anchor or direction.

If it contains multiple values, y defines the y coordinate of each individual glyph from the text. If there are fewer values than glyphs, the remaining glyphs are placed in line with the last positioned glyph. If there are more values than glyphs, the extra values are ignored.

html,
body,
svg {
  height: 100%;
}
<svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
  <!-- horizontal line to materialized the text base line -->
  <line x1="0" y1="40%" x2="100%" y2="40%" />
  <line x1="0" y1="60%" x2="100%" y2="60%" />
  <line x1="0" y1="80%" x2="100%" y2="80%" />

  <!-- vertical line to materialized the x positioning -->
  <line x1="5%" y1="0" x2="5%" y2="100%" />
  <line x1="55%" y1="0" x2="55%" y2="100%" />

  <text>
    <!-- y with a single value -->
    <tspan y="40%" x="5%">SVG</tspan>

    <!-- y with multiple values -->
    <tspan y="40%,60%,80%" x="55%">SVG</tspan>
  </text>
</svg>
text {
  font: 40px sans-serif;
}

line {
  fill: none;
  stroke: red;
  stroke-width: 0.5px;
  stroke-dasharray: 2px;
}
<use>

For <use>, y defines the y coordinate of the upper left corner of the referenced element.

Note: Declaring a <length> or <percentage> value in CSS using the y geometry property overrides the y-axis coordinate of the <use> set by the y attribute in some browsers. This behavior is at-risk.

Examples

This example contains three <rect> elements, each with a y value smaller than the previous value.

html,
body,
svg {
  height: 100%;
}
<svg viewBox="0 0 100 300" xmlns="http://www.w3.org/2000/svg">
  <rect y="220" x="20" width="60" height="60" fill="red" />
  <rect y="120" x="20" width="60" height="60" fill="yellow" />
  <rect y="20" x="20" width="60" height="60" fill="purple" />
</svg>
Specifications See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4