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 %,如何在容器底部出现水平滚动?尝试使用最大宽度,没有任何结果。
overflow将此元素的水平设置为auto。
overflow
auto
jsfiddle 演示
#container { overflow-x: auto; }