0
Ich habe sieht: Understanding offsetWidth, clientWidth, scrollWidth and -Height, respectivelyoffset vs scrollWidth: anders sein sollte, aber die gleichen
Aber es ist nicht der Fall. Zum Beispiel
.main {
width: 400px;
overflow: visible;
}
.main table {
width: 600px;
}
<div class="main">
<table>
<thead><tr><th>Foo</th><th>Bar</th></tr></thead>
<tbody>
<tr><td>Row1</td><td>Hello</td></tr>
<tr><td>Row2</td><td>World</td></tr>
</tbody>
</table>
</div>
---------------------------------------
|main |
| ----------------------------------------------------
| | table |
| ----------------------------------------------------
| |
| |
---------------------------------------
die offset und scrollWidth des Haupt div-Element sind die gleichen: 400. Sie sollten jeweils 400 und 600 sein, nicht wahr?