aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/svg/attribute/y/index.html
blob: d73d5f2ab551f699782d5ad485bf205469bc55d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
title: 'y'
slug: Web/SVG/Attribute/y
tags:
  - SVG
  - SVG атрибуты
translation_of: Web/SVG/Attribute/y
---
<p>« <a href="/ru/docs/Web/SVG/Attribute" title="Справочник SVG атрибутов">Справочник SVG атрибутов</a></p>

<p><span class="seoSummary">Атрибут <strong><code>y</code></strong> указывает координаты вертикальной оси системы координат в контексте объекта. В основном атрибут работает по оси y от верхнего левого угла прямоугольной области(см. документацию каждого отдельного элемента).</span></p>

<p>Если атрибут явно не указан, его значение по умолчанию равняется <strong>0</strong>, за исключением элементов {{SVGElement ("filter")}} и {{SVGElement ("mask")}}, где значение по умолчанию равняется <strong> -10% </strong>.</p>

<h2 id="Использование">Использование</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="row">Категории</th>
   <td>None</td>
  </tr>
  <tr>
   <th scope="row">Значение</th>
   <td><a href="/ru/SVG/Content_type#Coordinate">&lt;coordinate&gt;</a></td>
  </tr>
  <tr>
   <th scope="row">Анимация</th>
   <td>Возможно</td>
  </tr>
  <tr>
   <th scope="row">Нормативные документы (en)</th>
   <td><a class="external" href="http://www.w3.org/TR/SVG/text.html#AltGlyphElementYAttribute">SVG 1.1 (2nd Edition): altGlyph element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/interact.html#CursorElementYAttribute">SVG 1.1 (2nd Edition): cursor element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/filters.html#fePointLightYAttribute">SVG 1.1 (2nd Edition): fePointLight element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/filters.html#feSpotLightYAttribute">SVG 1.1 (2nd Edition): feSpotLight element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/filters.html#FilterElementYAttribute">SVG 1.1 (2nd Edition): filter element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/extend.html#ForeignObjectElementYAttribute">SVG 1.1 (2nd Edition): foreignObject element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/text.html#GlyphRefElementYAttribute">SVG 1.1 (2nd Edition): glyphRef element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/struct.html#ImageElementYAttribute">SVG 1.1 (2nd Edition): image element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/pservers.html#PatternElementYAttribute">SVG 1.1 (2nd Edition): pattern element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/shapes.html#RectElementYAttribute">SVG 1.1 (2nd Edition): rect element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/struct.html#SVGElementYAttribute">SVG 1.1 (2nd Edition): svg element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/text.html#TextElementYAttribute">SVG 1.1 (2nd Edition): text element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/struct.html#UseElementYAttribute">SVG 1.1 (2nd Edition): use element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/filters.html#FilterPrimitiveYAttribute">SVG 1.1 (2nd Edition): Filter primitive</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/masking.html#MaskElementYAttribute">SVG 1.1 (2nd Edition): mask element</a><br>
    <a class="external" href="http://www.w3.org/TR/SVG/text.html#TSpanElementYAttribute">SVG 1.1 (2nd Edition): tspan element</a></td>
  </tr>
 </tbody>
</table>

<p>{{page("/ru/SVG/Content_type","coordinate")}}</p>

<h2 id="Пример">Пример</h2>

<pre class="brush: xml line-numbers  language-xml"><code class="language-xml"><span class="prolog token">&lt;?xml version="1.0"?&gt;</span>
<span class="tag token"><span class="tag token"><span class="punctuation token">&lt;</span>svg</span> <span class="attr-name token">width</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>120<span class="punctuation token">"</span></span> <span class="attr-name token">height</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>120<span class="punctuation token">"</span></span>
     <span class="attr-name token">viewBox</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>0 0 120 120<span class="punctuation token">"</span></span>
     <span class="attr-name token">xmlns</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>http://www.w3.org/2000/svg<span class="punctuation token">"</span></span><span class="punctuation token">&gt;</span></span>

  <span class="tag token"><span class="tag token"><span class="punctuation token">&lt;</span>rect</span> <span class="attr-name token">x</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>10<span class="punctuation token">"</span></span> <span class="attr-name token">y</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>10<span class="punctuation token">"</span></span> <span class="attr-name token">width</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>100<span class="punctuation token">"</span></span> <span class="attr-name token">height</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>100<span class="punctuation token">"</span></span><span class="punctuation token">/&gt;</span></span>
<span class="tag token"><span class="tag token"><span class="punctuation token">&lt;/</span>svg</span><span class="punctuation token">&gt;</span></span></code></pre>

<h2 id="Элементы">Элементы</h2>

<p>Следующие элементы могут использовать атрибут <code>y</code>.</p>

<ul>
 <li><a href="/ru/SVG/Element#FilterPrimitive">Filter primitive elements</a> »</li>
 <li>{{SVGElement("altGlyph")}}</li>
 <li>{{SVGElement("fePointLight")}}</li>
 <li>{{SVGElement("feSpotLight")}}</li>
 <li>{{SVGElement("filter")}}</li>
 <li>{{SVGElement("foreignObject")}}</li>
 <li>{{SVGElement("glyphRef")}}</li>
 <li>{{SVGElement("image")}}</li>
 <li>{{SVGElement("pattern")}}</li>
 <li>{{SVGElement("rect")}}</li>
 <li>{{SVGElement("svg")}}</li>
 <li>{{SVGElement("text")}}</li>
 <li>{{SVGElement("use")}}</li>
 <li>{{SVGElement("mask")}}</li>
 <li>{{SVGElement("tref")}}</li>
 <li>{{SVGElement("tspan")}}</li>
</ul>