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.
#wrapper { margin: 0 auto; margin: 40px 100px 0 100px; } <div id="wrapper"> <div id="container"> </div> </div>
私はこれをしたい: コンテナの幅が 100% を超える場合、コンテナの下部に水平スクロールを表示するにはどうすればよいですか? max-width を使用しようとしましたが、結果はありませんでした。
overflowこの要素の水平方向を に設定しautoます。
overflow
auto
jsfiddle デモ
#container { overflow-x: auto; }