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.
是否可以在 CSS 2.1 中仅实现水平溢出?
overflow: auto;
将导致块元素同时具有水平和垂直滚动条。我想要一个<div>只显示水平滚动条的块元素(比如说)。我怎么做?
<div>
尝试overflow-x: auto;
overflow-x: auto;
它甚至可以在 IE6 中运行!
我试过overflow-x: hidden;了,这对我有用。
overflow-x: hidden;