相关疑难解决方法(0)

滚动元素没有滚动条与CSS

这里有JSbin的视觉效果和代码.

左侧边栏,全高,固定位置,内容溢出,无需滚动条即可访问(这意味着没有overflow: scroll).我真的不想在Javascript中这样做.

几个月前,我用CSS overflow: hidden和其他东西完成了这个,现在我找不到代码或记住它是如何完成的.由于某种原因,谷歌对此毫无用处.这个侧边栏的内容位于我网站右侧的内容中.酒吧本身不仅可以垂直放在屏幕上.

我需要能够向下滚动这个对象,无论它是固定的还是绝对的,它必须一直跨越页面的高度.滚动主要内容和侧边栏是独立的.到目前为止,即使设置为绝对,包装器也会停止在页面底部之外.

我试过的每个组合position,float,overflow,height/ max-height,top,bottom,leftdisplay我能想到的.在没有运气的情况下尝试了很多其他的东西.

任何帮助是极大的赞赏.

CSS:

#left-wrap {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 3;
  max-width: 24em;
  height: 100%;  
  overflow: hidden;
  background-color: rgba(26,26,26,1);
}
#left-bar {
  max-width: 100%;
  max-height: none;
  position: relative;
}
#left-bar.sidebars .block {
  padding: 5%;
  border-right: none;
  margin:  5%;
  background-color: rgba(255,255,238,0.4);
  margin-bottom: 1.5em;
  font-size: 0.9em;
  overflow: hidden;
}
.sidebars …
Run Code Online (Sandbox Code Playgroud)

html css scroll scrollbar css3

5
推荐指数
1
解决办法
9285
查看次数

标签 统计

css ×1

css3 ×1

html ×1

scroll ×1

scrollbar ×1