diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:45 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:45 -0500 |
| commit | 1109132f09d75da9a28b649c7677bb6ce07c40c0 (patch) | |
| tree | 0dd8b084480983cf9f9680e8aedb92782a921b13 /files/es/web/api/htmlelement/offsetwidth/index.html | |
| parent | 4b1a9203c547c019fc5398082ae19a3f3d4c3efe (diff) | |
| download | translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.gz translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.bz2 translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.zip | |
initial commit
Diffstat (limited to 'files/es/web/api/htmlelement/offsetwidth/index.html')
| -rw-r--r-- | files/es/web/api/htmlelement/offsetwidth/index.html | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/files/es/web/api/htmlelement/offsetwidth/index.html b/files/es/web/api/htmlelement/offsetwidth/index.html new file mode 100644 index 0000000000..13a9a7e454 --- /dev/null +++ b/files/es/web/api/htmlelement/offsetwidth/index.html @@ -0,0 +1,62 @@ +--- +title: HTMLElement.offsetWidth +slug: Web/API/HTMLElement/offsetWidth +translation_of: Web/API/HTMLElement/offsetWidth +--- +<div>{{ APIRef("HTML DOM") }}</div> + +<p>La propiedad de solo lectura <code><strong>HTMLElement.offsetWidth</strong></code> devuelve el ancho del layout del elemento. Esta medida incluye los bordes del elemento asignados al mismo en los estilos CSS.</p> + +<h2 id="Sintáxis">Sintáxis</h2> + +<pre class="syntaxbox">var<em> offsetWidth</em> =<em>element</em>.offsetWidth; +</pre> + +<p><strong><code>offsetWidth</code> </strong>es una propiedad de solo lectura.</p> + +<div class="note"> +<p>Esta propiedad redondeará el valor a un entero. Si necesitas un valor fraccional usa: {{ domxref("element.getBoundingClientRect()") }}.</p> +</div> + +<h2 id="Ejemplo">Ejemplo</h2> + +<p> </p> + +<p> <img alt="Image:Dimensions-offset.png" class="internal" src="/@api/deki/files/186/=Dimensions-offset.png"></p> + + +<h2 id="Especificaciones">Especificaciones</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Especificación</th> + <th scope="col">Estado</th> + <th scope="col">Comentario</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="Notas">Notas</h3> + +<p><code>offsetWidth</code> es una propiedad del <abbr title="Dynamic HyperText Markup Language">DHTML</abbr> "object model" que fue inicialmente introducido por MSIE. A veces es referido como box-width.</p> + +<h2 id="Compatibilidad_con_Navegadores">Compatibilidad con Navegadores</h2> + +<p>{{Compat("api.HTMLElement.offsetWidth")}}</p> + +<h2 id="Links_Relacionados">Links Relacionados</h2> + +<ul> + <li>{{domxref("Element.clientWidth")}}</li> + <li>{{domxref("Element.scrollWidth")}}</li> + <li><a href="/en-US/docs/Determining_the_dimensions_of_elements">Determining the dimensions of elements</a></li> + <li><a href="https://docs.microsoft.com/en-us/previous-versions//hh781509(v=vs.85)">MSDN Measuring Element Dimension and Locati</a></li> +</ul> |
