diff options
Diffstat (limited to 'files/es/web/svg/element/text/index.html')
| -rw-r--r-- | files/es/web/svg/element/text/index.html | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/files/es/web/svg/element/text/index.html b/files/es/web/svg/element/text/index.html new file mode 100644 index 0000000000..e694d9dd52 --- /dev/null +++ b/files/es/web/svg/element/text/index.html @@ -0,0 +1,152 @@ +--- +title: text +slug: Web/SVG/Element/text +translation_of: Web/SVG/Element/text +--- +<div>{{SVGRef}}</div> + +<p>El elemento text define un elemento gráfico que consiste en texto. Nótese que es posible aplicar un degradado, patrón, recorte, máscara o filtro al texto</p> + +<h2 id="Uso">Uso</h2> + +<p>{{svginfo}}</p> + +<h2 id="Ejemplo">Ejemplo</h2> + +<pre class="brush: xml"><?xml version="1.0"?> +<svg xmlns="http://www.w3.org/2000/svg" + width="100px" height="30px" viewBox="0 0 1000 300"> + + <text x="250" y="150" + font-family="Verdana" + font-size="55"> + Hello, out there + </text> + + <!-- Show outline of canvas using 'rect' element --> + <rect x="1" y="1" width="998" height="298" + fill="none" stroke-width="2" /> +</svg> +</pre> + +<p>El elemento <text> es usado para dibujar texto. El siguiente código de ejemplo es usado para dibujar texto con coordenadas.</p> + +<pre class="brush: xml"><svg xmlns="http://www.w3.org/2000/svg" width="100px" height="50px"> + <text x="10" y="20">SVG Text Example</text> +</svg> +</pre> + +<p>El elemento text puede ser rotado. El siguiente código de ejemplo muestra cómo.</p> + +<pre class="brush: xml"><svg xmlns="http://www.w3.org/2000/svg" width="100px" height="50px"> + <text x="10" y="20" + transform="rotate(30 20,40)"> + SVG Text Rotation example + </text> +</svg> +</pre> + +<p>SVG text también puede ser estilizado</p> + +<pre class="brush: xml"><svg xmlns="http://www.w3.org/2000/svg" width="100px" height="50px"> + <text x="10" y="20" + style="font-family: Times New Roman; + font-size : 24; + stroke : #00ff00; + fill : #0000ff;"> + SVG text styling + </text> +</svg> +</pre> + +<h2 id="Atributos">Atributos</h2> + +<h3 id="Atributos_globales">Atributos globales</h3> + +<ul> + <li><a href="/en/SVG/Attribute#ConditionalProccessing">Atributos de procesamiento condicional »</a></li> + <li><a href="/en/SVG/Attribute#Core">Atributos base »</a></li> + <li><a href="/en/SVG/Attribute#GraphicalEvent">Atributos de eventos gráficos »</a></li> + <li><a href="/en/SVG/Attribute#Presentation" title="en/SVG/Attribute#Presentation">Atributos de presentación</a> »</li> + <li>{{ SVGAttr("class") }}</li> + <li>{{ SVGAttr("style") }}</li> + <li>{{ SVGAttr("externalResourcesRequired") }}</li> + <li>{{ SVGAttr("transform") }}</li> +</ul> + +<h3 id="Atributos_específicos">Atributos específicos</h3> + +<ul> + <li>{{ SVGAttr("x") }}</li> + <li>{{ SVGAttr("y") }}</li> + <li>{{ SVGAttr("dx") }}</li> + <li>{{ SVGAttr("dy") }}</li> + <li>{{ SVGAttr("text-anchor") }}</li> + <li>{{ SVGAttr("rotate") }}</li> + <li>{{ SVGAttr("textLength") }}</li> + <li>{{ SVGAttr("lengthAdjust") }}</li> +</ul> + +<h2 id="Interfaz_DOM">Interfaz DOM</h2> + +<p>Este elemento hereda la interfaz de <code><a href="/en/DOM/SVGTextElement" title="en/DOM/SVGTextElement">SVGTextElement</a></code>.</p> + +<h2 id="Compatibilidad_con_navegadores">Compatibilidad con navegadores</h2> + +<p>{{ CompatibilityTable() }}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>IE</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{ CompatChrome('1.0') }}</td> + <td>{{ CompatGeckoDesktop('1.8') }}</td> + <td>{{ CompatIE('9.0') }}</td> + <td>{{ CompatOpera('8.0') }}</td> + <td>{{ CompatSafari('3.0.4') }}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Phone</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{ CompatAndroid('3.0') }}</td> + <td>{{ CompatGeckoMobile('1.8') }}</td> + <td>{{ CompatNo() }}</td> + <td>{{ CompatVersionUnknown() }}</td> + <td>{{ CompatSafari('3.0.4') }}</td> + </tr> + </tbody> +</table> +</div> + +<p>La gráfica está basada en <a href="/en/SVG/Compatibility_sources" title="en/SVG/Compatibility sources">estas fuentes</a>.</p> + +<h2 id="Relacionados">Relacionados</h2> + +<ul> + <li>{{ SVGElement("tspan") }}</li> + <li>{{ SVGElement("tref") }}</li> + <li>{{ SVGElement("altGlyph") }}</li> +</ul> |
