たとえば、1280 x 768 px のコンテナー div を作成し、viewport メタ タグを削除すると、適切なブラウザーはコンテナーのサイズを自動的に変更して、画面の解像度がコンテナーのサイズよりも小さくても、デバイスに完全に収まるようにします。しかし、height: auto で機能しないのはなぜですか? 高さをハードコーディングする代わりに、コンテナの子要素の高さに応じてブラウザにコンテナの高さを計算させたい場合、どのようにしますか?
<head></head>
<body>
<div id="container"> Lorem ipsum.... Lorem ipsum </div>
</body>
<style>
/* if you hardcode the height it'll fit the viewport*/
div#container{ width: 1700px; height: 1500px; }
/* if you use height:auto instead it wont be resized*/
div#container{ width: 1700px; height: auto; }
</style>
ご協力いただきありがとうございます!