Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
<div id="container"> some content </div>
コンテナのdivのサイズを変更できるとしましょう。サイズを変更しているときに、既にオーバーフローしているかどうかを確認するにはどうすればよいですか(内部コンテンツの幅<コンテナの幅または内部コンテンツの高さ<コンテナの高さ)。
私の知る限り、唯一の方法は比較することです
clientHeight < scrollHeight
垂直スクロールバー用
と
clientWidth < scrollWidth
水平スクロールバー用。