我的网站上有这种滑动结构: http://jsfiddle.net/bdfe70qu/1/
body {
max-width: 100px;
margin: 0 auto;
}
<div id="pages">
<div class="col-xs-6 tab">
</div>
<div class="col-xs-6 tab">
</div>
</div>
我有一个 100 像素宽的正文和可以在该正文中滑动的选项卡。 我“只是”需要隐藏 100px 容器之外的其他选项卡。
有什么见解吗?
谢谢
最佳答案
您要查找的 CSS 属性和值是 overflow: hidden
,但要使其正常工作,您不仅需要将其应用于 body,还需要将其应用于html 元素:
html, body {
max-width: 100px;
margin: 0 auto;
overflow: hidden;
}
updated demo
关于jquery - 中央栏为 : hide what's outside this column 的网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28604280/