css - 基础和滚动 Pane 100% 问题

标签 css 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 external css file

.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;
}

最佳答案

试试这个,删除显示 block 并将溢出:自动更改为隐藏;我相信这会对您有所帮助。

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

关于css - 基础和滚动 Pane 100% 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40641428/

相关文章:

css - 添加 :after to :enabled CSS pseudo-class

html - Div 没有向左浮动

javascript - 使用 jquery 将小拉丁字母自动递增到 html 段落

html - CSS 媒体查询不适用于移动设备

java - JTable : Adding one to a JPanel, 并且它不显示自身

javascript - 奇怪的javascript滚动条问题

css - 选择不属于同一父元素的第一个子元素

ruby-on-rails - 在 Foundation 中使用变量和 mixin

css - Foundation 5 媒体查询 Sass 错误

java - 如何对齐附加到 JScrollPane 的文本