diff options
Diffstat (limited to 'files/pt-br/web/svg/element/style/index.html')
-rw-r--r-- | files/pt-br/web/svg/element/style/index.html | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/files/pt-br/web/svg/element/style/index.html b/files/pt-br/web/svg/element/style/index.html new file mode 100644 index 0000000000..c68e13cfde --- /dev/null +++ b/files/pt-br/web/svg/element/style/index.html @@ -0,0 +1,117 @@ +--- +title: style +slug: Web/SVG/Element/style +tags: + - Elemento + - Estilo + - Referencia + - SVG +translation_of: Web/SVG/Element/style +--- +<div>{{SVGRef}}</div> + +<p>O elemento de estilo possibilita que folhas de estilos sejam incorporadas diretamente ao conteúdo do SVG. O elemento <code>style</code> do SVG possui os mesmos atributos que o elemento correspondente no HTML (veja o elemento no HTML {{ HTMLElement("style") }}).</p> + +<h2 id="Contexto_de_uso">Contexto de uso</h2> + +<p>{{svginfo}}</p> + +<h2 id="Exemplo">Exemplo</h2> + +<pre class="brush: html"><svg width="100%" height="100%" viewBox="0 0 100 100" + xmlns="http://www.w3.org/2000/svg"> + <style> + /* <![CDATA[ */ + circle { + fill: orange; + stroke: black; + stroke-width: 10px; // Note que este valor depende do valor do pixel definido no viewBox + } + /* ]]> */ + </style> + + <circle cx="50" cy="50" r="40" /> +</svg> +</pre> + +<p>Resultado:</p> + +<p>{{EmbedLiveSample("Exemplo",150,165)}}</p> + +<h2 id="Atributos">Atributos</h2> + +<h3 id="Atributos_globais">Atributos globais</h3> + +<ul> + <li><a href="/en/SVG/Attribute#Core" title="en/SVG/Attribute#Core">Atributos centrais</a> »</li> +</ul> + +<h3 id="Atributos_específicos">Atributos específicos</h3> + +<ul> + <li>{{ SVGAttr("type") }}</li> + <li>{{ SVGAttr("media") }}</li> + <li>{{ SVGAttr("title") }}</li> +</ul> + +<h2 id="Interface_DOM">Interface DOM</h2> + +<p>O elemento implementa a interface do <code><a href="/en/DOM/SVGStyleElement" title="en/DOM/SVGStyleElement">SVGStyleElement</a></code>.</p> + +<h2 id="Compatibilidade_dos_navegadores">Compatibilidade dos navegadores</h2> + +<p>{{ CompatibilityTable() }}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th scope="col">Recurso</th> + <th scope="col">Chrome</th> + <th scope="col">Firefox (Gecko)</th> + <th scope="col">Internet Explorer</th> + <th scope="col">Opera</th> + <th scope="col">Safari</th> + </tr> + <tr> + <td>Suporte básico</td> + <td>1.0</td> + <td>{{ CompatGeckoDesktop('1.8') }}</td> + <td>{{ CompatIE('9.0') }}</td> + <td>{{ CompatOpera('9.0') }}</td> + <td>{{ CompatSafari('3.0.4') }}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Recurso</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Phone</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Suporte básico</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>A tabela é baseada <a href="/en/SVG/Compatibility_sources" title="en/SVG/Compatibility sources">nestas fontes</a>.</p> + +<h2 id="Veja_também">Veja também</h2> + +<ul> + <li><a href="/en/HTML/Element/style" title="en/HTML/Element/style">Elemento <style> no HTML</a></li> +</ul> |