Skip to content

Commit 1cefc76

Browse files
authored
Add missing divs to Element»getBoundingClientRect() example (mdn#6180)
The live demo of the scrolling example is missing two div elements necessary for it to work.
1 parent ff949c3 commit 1cefc76

File tree

1 file changed

+5
-1
lines changed
  • files/en-us/web/api/element/getboundingclientrect

1 file changed

+5
-1
lines changed

files/en-us/web/api/element/getboundingclientrect/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ <h3 id="Basic">Basic</h3>
134134
<h4 id="Scrolling">Scrolling</h4>
135135
<p>This example demonstrates how bounding client rect is changing when document is scrolled.</p>
136136

137-
<pre class="brush: html notranslate">&lt;div&gt;&lt;/div&gt;</pre>
137+
<pre class="brush: html notranslate">
138+
&lt;div&gt;&lt;/div&gt;
139+
&lt;div id="example"&gt;&lt;/div&gt;
140+
&lt;div id="controls"&gt;&lt;/div&gt;
141+
</pre>
138142

139143
<pre class="brush: css notranslate">div#example {
140144
width: 400px;

0 commit comments

Comments
 (0)