We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35bbedb commit 1868d0aCopy full SHA for 1868d0a
docs/dom/element.md
@@ -371,8 +371,8 @@ document.body.scrollHeight
371
372
```javascript
373
// HTML 代码如下
374
-// <div id="myDiv" style="height: 200px; overflow: hidden;">...<div>
375
-document.getElementById('myDiv').scrollHeight // 356
+// <div id="myDiv" style="height: 200px; overflow: hidden;">...</div>
+document.getElementById('myDiv').scrollHeight // 200
376
```
377
378
上面代码中,即使`myDiv`元素的 CSS 高度只有200像素,且溢出部分不可见,但是`scrollHeight`仍然会返回该元素的原始高度。
0 commit comments