aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/api/element/scrollintoview
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
commit4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch)
treed4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/api/element/scrollintoview
parent33058f2b292b3a581333bdfb21b8f671898c5060 (diff)
downloadtranslated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip
initial commit
Diffstat (limited to 'files/de/web/api/element/scrollintoview')
-rw-r--r--files/de/web/api/element/scrollintoview/index.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/files/de/web/api/element/scrollintoview/index.html b/files/de/web/api/element/scrollintoview/index.html
new file mode 100644
index 0000000000..ccbcc3e6ea
--- /dev/null
+++ b/files/de/web/api/element/scrollintoview/index.html
@@ -0,0 +1,85 @@
+---
+title: Element.scrollIntoView()
+slug: Web/API/Element/scrollIntoView
+tags:
+ - API
+ - CSSOM Views
+ - Experimentell
+ - Methode(2)
+ - Reference
+translation_of: Web/API/Element/scrollIntoView
+---
+<div>{{ APIRef("DOM")}}{{SeeCompatTable}}</div>
+
+<p>Die Methode <code><strong>Element.scrollIntoView()</strong></code> scrolled das Element in den sichtbaren Bereich des Browsers.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox notranslate">element.scrollIntoView(); // Gleich mit<code> element.scrollIntoView(true)
+</code>element.scrollIntoView(<em>alignToTop</em>); // Boolean Argument
+element.scrollIntoView(<em>scrollIntoViewOptions</em>); // Object Argument
+</pre>
+
+<h3 id="Parameter">Parameter</h3>
+
+<dl>
+ <dt><em><code>alignToTop</code></em></dt>
+ <dd>Dies ist ein {{jsxref("Boolean")}} Wert:
+ <ul>
+ <li>Bei <code>true</code> wird der obere Rand des Elements an den oberen Rand des sichtbaren Bereichs im Browser gescrolled.</li>
+ <li>Bei <code>false</code> wird der untere Rand des Elements an den unteren Rand des sichtbaren Bereichs im Browser gescrolled.</li>
+ </ul>
+ </dd>
+ <dt><em><code>scrollIntoViewOptions</code></em></dt>
+ <dd>Ein Boolean oder Objekt mit den folgenden Optionen:</dd>
+ <dd>
+ <pre class="idl notranslate">{
+ behavior: <strong>"auto"</strong> | "smooth",
+ block: <strong>"start"</strong> | "end",
+}</pre>
+ </dd>
+ <dd>Wenn der Wert ein Boolean, enspricht <code>true</code> <code>{block: "start"} und false {block: "end"}.</code></dd>
+</dl>
+
+<h2 id="Beispiel">Beispiel</h2>
+
+<pre class="brush: js notranslate">var element = document.getElementById("box");
+
+element.scrollIntoView();
+element.scrollIntoView(false);
+element.scrollIntoView({block: "end"});
+element.scrollIntoView({block: "end", behavior: "smooth"});
+</pre>
+
+<h2 id="Notizen">Notizen</h2>
+
+<p>Das Element wird eventuell nicht ganz nach oben oder unten gescrolled. Je nach Layout der anderen Elemente.</p>
+
+<h2 id="Technische_Daten"><span class="short_text" id="result_box" lang="de"><span>Technische Daten</span></span></h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th>Specification</th>
+ <th>Status</th>
+ <th>Kommentar</th>
+ </tr>
+ <tr>
+ <td>{{SpecName("CSSOM View", "#dom-element-scrollintoview", "Element.scrollIntoView()")}}</td>
+ <td>{{Spec2("CSSOM View")}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browserkompatibilität">Browserkompatibilität</h2>
+
+
+
+<p>{{Compat("api.Element.scrollIntoView")}}</p>
+
+<h2 id="Siehe_auch">Siehe auch</h2>
+
+<ul>
+ <li>{{non-standard_inline}} <a href="/en-US/docs/Web/API/Element/scrollIntoViewIfNeeded"><code>Element.scrollIntoViewIfNeeded()</code></a></li>
+</ul>