aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/svg/element/g/index.html
blob: dca6a5d04c099dff7dfc70c18d2a0b1120b21546 (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
87
88
89
90
91
92
93
94
95
96
97
98
99
---
title: <g>
slug: Web/SVG/Element/g
tags:
  - NeedsUpdate
  - SVG
translation_of: Web/SVG/Element/g
original_slug: Web/SVG/Элемент/g
---
<div>{{SVGRef}}</div>

<p><span class="seoSummary">Элемент g используется для группировки других SVG элементов.</span> Любые преобразования применяемые к g элементу наследуются его дочерними элементами. Также g используется для группировки различных элементов, чтобы позднее можно было сослаться на них с помощью {{SVGElement("use")}}.</p>

<h2 id="Контекст_использования">Контекст использования</h2>

<p>{{svginfo}}</p>

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

<pre class="brush: html notranslate">&lt;svg viewBox="0 0 95 50"
     xmlns="http://www.w3.org/2000/svg"&gt;
   &lt;g stroke="green" fill="white" stroke-width="5"&gt;
     &lt;circle cx="25" cy="25" r="15"/&gt;
     &lt;circle cx="40" cy="25" r="15"/&gt;
     &lt;circle cx="55" cy="25" r="15"/&gt;
     &lt;circle cx="70" cy="25" r="15"/&gt;
   &lt;/g&gt;
&lt;/svg&gt;
</pre>

<p>{{EmbedLiveSample("Example",220,130)}}</p>

<h2 id="Атрибуты">Атрибуты</h2>

<h3 id="Глобальные_атрибуты">Глобальные атрибуты</h3>

<ul>
 <li><a href="/en-US/docs/SVG/Attribute#ConditionalProccessing">Conditional processing attributes</a> »</li>
 <li><a href="/en-US/docs/SVG/Attribute#Core">Core attributes</a> »</li>
 <li><a href="/en-US/docs/SVG/Attribute#GraphicalEvent">Graphical event attributes</a> »</li>
 <li><a href="/en-US/docs/SVG/Attribute#Presentation">Presentation attributes</a> »</li>
 <li>{{SVGAttr("class")}}</li>
 <li>{{SVGAttr("style")}}</li>
 <li>{{SVGAttr("externalResourcesRequired")}}</li>
 <li>{{SVGAttr("transform")}}</li>
</ul>

<h3 id="Специфичные_атрибуты">Специфичные атрибуты</h3>

<p><em>Нет специфичных атрибутов.</em></p>

<h2 id="Интерфейс_DOM">Интерфейс DOM</h2>

<p>Этот элемент реализует  <code><a href="/en-US/docs/DOM/SVGGElement">SVGGElement</a></code> интерейс.</p>

<h2 id="Спецификации">Спецификации</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('SVG2', 'struct.html#GElement', '&lt;g&gt;')}}</td>
   <td>{{Spec2('SVG2')}}</td>
   <td></td>
  </tr>
  <tr>
   <td>{{SpecName('SVG1.1', 'struct.html#Groups', '&lt;g&gt;')}}</td>
   <td>{{Spec2('SVG1.1')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Поддержка_браузерами">Поддержка браузерами</h2>

<div class="hidden">
<p>The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
</div>

<p>{{Compat("svg.elements.g")}}</p>



<h2 id="Смотрите_также">Смотрите также:</h2>



<ul>
 <li>{{SVGElement("use")}}</li>
 <li>{{SVGElement("defs")}}</li>
 <li>{{SVGElement("symbol")}}</li>
 <li><a href="http://tutorials.jenkov.com/svg/g-element.html">SVG элемент g</a></li>
</ul>