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/window/scrollto | |
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/window/scrollto')
-rw-r--r-- | files/pt-br/web/api/window/scrollto/index.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/files/pt-br/web/api/window/scrollto/index.html b/files/pt-br/web/api/window/scrollto/index.html new file mode 100644 index 0000000000..10d844a41f --- /dev/null +++ b/files/pt-br/web/api/window/scrollto/index.html @@ -0,0 +1,56 @@ +--- +title: Window.scrollTo() +slug: Web/API/Window/scrollTo +tags: + - API + - CSSOM View + - NeedsCompatTable + - NeedsMarkupWork + - NeedsSpecTable + - Referencia + - metodo +translation_of: Web/API/Window/scrollTo +--- +<div>{{ APIRef }}</div> + +<h2 id="Summary" name="Summary">Resumo</h2> + +<p>Realiza a rolagem para um conjunto de coordenadas em particular em um documento.</p> + +<h2 id="Syntax" name="Syntax">Sintaxe</h2> + +<pre class="syntaxbox"><code>window.scrollTo(<em>x-coord</em>, <em>y-coord</em>)</code></pre> + +<h3 id="Parameters" name="Parameters">Parâmetros</h3> + +<ul> + <li><code>x-coord</code> é o pixel do eixo horizontal do documento que você quer exibir no canto superior esquerdo.</li> + <li><code>y-coord</code> é o pixel do eixo vertical do documento que você quer exibir no canto superior esquerdo.</li> +</ul> + +<h2 id="Example" name="Example">Exemplo</h2> + +<pre class="brush:js">window.scrollTo( 0, 1000 );</pre> + +<h2 id="Notes" name="Notes">Notas</h2> + +<p>Essa função é efetivamente a mesma que <a href="/en-US/docs/DOM/Window.scroll">window.scroll</a>. Para rolagem relativa, veja <a href="/en-US/docs/DOM/Window.scrollBy">window.scrollBy</a>, <a href="/en-US/docs/DOM/Window.scrollByLines">window.scrollByLines</a> e <a href="/en-US/docs/DOM/Window.scrollByPages">window.scrollByPages</a>.</p> + +<h2 id="Specification" name="Specification">Especificações</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Especificação</th> + <th scope="col">Status</th> + <th scope="col">Comentário</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{ SpecName('CSSOM View', '#dom-window-scroll', 'window.scroll()') }}</td> + <td>{{ Spec2('CSSOM View') }}</td> + <td>Definição inicial.</td> + </tr> + </tbody> +</table> |