jquery - 中央栏为 : hide what's outside this column 的网站

标签 jquery css twitter-bootstrap-3 swipe

我的网站上有这种滑动结构: 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/

相关文章:

javascript - JS触发checkbox的checked attr不会动态改变

jquery - 我如何在 JQuery 中处理返回的 header 类型为 "text/html"的 JSON 数据?

html - 使用列表的选项卡式导航

javascript - 根据另一个 div 单击更改 div 中的元素

css - Bootstrap 3 在中型设备上换行

jquery - 修复相对于浏览器 Chrome 的 HTML 页面元素

jquery - 下拉框不断闪烁 - JQuery 和 CSS

html - 修复警报框的高度定义

html - 根据我的需要调整 bootstrap3 网格大小

jquery - 相对于 Fancybox 增加高度