diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
commit | 074785cea106179cb3305637055ab0a009ca74f2 (patch) | |
tree | e6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/api/htmlelement/offsetwidth | |
parent | da78a9e329e272dedb2400b79a3bdeebff387d47 (diff) | |
download | translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2 translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip |
initial commit
Diffstat (limited to 'files/pt-br/web/api/htmlelement/offsetwidth')
-rw-r--r-- | files/pt-br/web/api/htmlelement/offsetwidth/index.html | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/files/pt-br/web/api/htmlelement/offsetwidth/index.html b/files/pt-br/web/api/htmlelement/offsetwidth/index.html new file mode 100644 index 0000000000..63d60ee4c1 --- /dev/null +++ b/files/pt-br/web/api/htmlelement/offsetwidth/index.html @@ -0,0 +1,65 @@ +--- +title: HTMLElement.offsetWidth +slug: Web/API/HTMLElement/offsetWidth +translation_of: Web/API/HTMLElement/offsetWidth +--- +<div>{{ APIRef("HTML DOM") }}</div> + +<p><code>A propriedade<strong> HTMLElement.offsetWidth</strong></code> é de somente leitura e retorna a largura de um elemento no layout. Normalmente, o <code>offsetWidth</code> é uma medida que inclui as bordas do elemento, seu padding horizontal e o vertical scrollbar (se presente e renderizado) e também a largura CSS do elemento.</p> + +<p>Sintaxe </p> + +<pre class="syntaxbox">var<em> offsetWidth</em> =<em>element</em>.offsetWidth; +</pre> + +<p><code>offsetWidth</code> é uma propriedade somente leitura.</p> + +<div class="note"> +<p>Esta propriedade irá arredondar o valor para um inteiro. se você precisa um valor fracionado, use {{ domxref("element.getBoundingClientRect()") }}.</p> +</div> + +<p> </p> + +<h2 id="Example" name="Example">Exemplo</h2> + +<p> </p> + +<p> <img alt="Image:Dimensions-offset.png" class="internal" src="/@api/deki/files/186/=Dimensions-offset.png"></p> + + +<h2 id="Specification" name="Specification">Especificação</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Especificação</th> + <th scope="col">Situação</th> + <th scope="col">Comentário</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('CSSOM View', '#dom-htmlelement-offsetwidth', 'offsetWidth')}}</td> + <td>{{Spec2('CSSOM View')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h3 id="Notes" name="Notes">Notas</h3> + +<p><code>offsetWidth</code> é uma propriedade do modelo de objeto <abbr title="Dynamic HyperText Markup Language">DHTML</abbr> que foi primeiro apresentado pelo MSIE. Algumas vezes referenciado como as dimensões físicas/gráficas do elemento, ou a largura do border-box.</p> + +<h2 id="Compatibilidade_de_Browsers">Compatibilidade de Browsers</h2> + +<p>{{Compat("api.HTMLElement.offsetWidth")}}</p> + +<h2 id="See_also" name="See_also">Veja também</h2> + +<ul> + <li>{{domxref("Element.clientWidth")}}</li> + <li>{{domxref("Element.scrollWidth")}}</li> + <li><a href="/en-US/docs/Determining_the_dimensions_of_elements">Determinando as dimensões dos elementos</a></li> +</ul> + +<div class="noinclude"> </div> |