滚动 - Div内部的Div

时间:2013-04-24 17:04:02

标签: css html overflow parallax

我正试图将DIV上的滚动放在另一个DIV中。

所以...第一个div是像div这样的内容。只是一些边距,填充和位置,以将我的内容放在中间列。

在这个div中,我想放一个带有垂直滚动的文本框。例如,我将800px高度内容放在400px高度空间内。

滚动类:

.scrollbox {
   overflow-y: auto !important;
   /*background: blue !important;*/
   height: 800px;
   width:100%; 
       }

但它没有发生任何事情。

看:http://www.agenciarara.com.br/2013/marinheiros

1 个答案:

答案 0 :(得分:0)

滚动的问题在你的视差脚本中,试试这部分代码:

<强> CSS

.scrollbox {
    position: relative;
    height: 400px;
    width: 100%;
    overflow-y: scroll;
    z-index: 9999; /*higher than paralax */ 
}