基础与滚动窗格100%问题

时间:2016-11-16 20:12:06

标签: css3 zurb-foundation jscrollpane

我有一个部分,它的全长相等。如果你在第二列看到内容在这里,如果我在jscroll-pane上做100%它显示水平条,如果我给它98%它正常工作但不是列的全宽。不知道为什么它会将水平条添加到100%而不是98%。我不确定基础是否导致我的问题,但是如果我把它从列中取出并连续排列100%工作正常而不是大6 -

  

HTML

<section id="component">
    <div class="row expanded collapse">
      <div class="large-6 column">
      <img src="images/image.png">      
      </div>
      <div class="large-6 column">
        <div class="jscroll-pane">      
        Content Here

        </div>       
       </div>      
      </div>
</section>
  

CSS

.jscroll-pane {
    display: block;
    width: 100% !important;
    height: 400px;
    max-height: 400px;
    overflow: auto;
    background-color: #fff;
}


#component {
    padding: 0px;
    background-color: #fff;
}
  

jscroll外部css文件

.jspContainer{
    overflow:hidden;
    position:relative;
    height:100% !important; 
    width: 100% !important;
}

.jspPane{
    position:absolute;
    width: 100%!important;
}

.jspVerticalBar
{
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 100%;
    background: red;
}

.jspHorizontalBar
{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 16px;
    background: red;
}

.jspCap
{
    display: none;
}

.jspHorizontalBar .jspCap
{
    float: left;
}

.jspTrack
{
    background: #d8d8d8;
    position: relative;
}

.jspDrag
{
    background: #000;
    position: relative;
    top: 0;
    left: 0;
    cursor: pointer;
}

.jspHorizontalBar .jspTrack,
.jspHorizontalBar .jspDrag
{
    float: left;
    height: 100%;
}

.jspArrow
{
    background: #50506d;
    text-indent: -20000px;
    display: block;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.jspArrow.jspDisabled
{
    cursor: default;
    background: #80808d;
}

.jspVerticalBar .jspArrow
{
    height: 16px;
}

.jspHorizontalBar .jspArrow
{
    width: 16px;
    float: left;
    height: 100%;
}

.jspVerticalBar .jspArrow:focus
{
    outline: none;
}

.jspCorner
{
    background: #eeeef4;
    float: left;
    height: 100%;
}

/* Yuk! CSS Hack for IE6 3 pixel bug :( */
* html .jspCorner
{
    margin: 0 -3px 0 0;
}

1 个答案:

答案 0 :(得分:1)

试试这个,删除显示块并更改溢出:auto to hidden;我相信这对你有帮助。

.jscroll-pane {
    width: 100% !important;
    height: 400px;
    max-height: 400px;
    overflow: hidden;
    background-color: #fff;
}