jScrollPane:保证金问题 [英] jScrollPane: Margin issue

查看:286
本文介绍了jScrollPane:保证金问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用jScrollPane似乎是一个边际问题。尝试设置边距:0几乎在jsp和实际jsp元素内的每个元素。我附上了一张图片来向你展示这个问题。问题是内容和实际滚动条之间的小黑色条纹。

Strugglig a bit with what seems to be a margin issue with jScrollPane. Tried setting margin: 0 pretty much on every element that's inside the jsp and on the actual jsp elements. I'm attaching a picture to show you the issue. The problem is the small black stripe between the content and the actual scrollbar.

JSP中的类

CSS for classes inside JSP

width: 100%;
min-height: 60px;
max-height: 300px;
margin: 0;
padding: 0;

JSP的CSS

.jspContainer
{
    overflow: hidden;
    position: relative;
}

.jspPane
{
    position: absolute;
}

.jspVerticalBar
{
    position: absolute;
    top: 0;
    right: 0px;
    width: 5px;
    height: 100%;
    background: url('../img/staffUl.png') repeat;
}

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

.jspVerticalBar *,
.jspHorizontalBar *
{
    margin: 0;
    padding: 0;
}

.jspCap
{
    display: none;
}

.jspHorizontalBar .jspCap
{
    float: left;
}

.jspTrack
{
    background: transparent;
    position: relative;
}

.jspDrag
{
    background: #2a2a2a;
    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;
}

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

.jspVerticalBar .jspArrow
{
    height: 16px;


推荐答案

KG Christensen,

KG Christensen,

字面上刚刚有同样的问题。进行一些挖掘,直到我想出这实际上是一个特征的jScrollPane。解决方案是将配置参数verticalGutter设置为0.默认为4px。

Literally just had the same problem as you. Took some digging around until I figured out that this is actually a "feature" of jScrollPane. The solution is to the set the config parameter 'verticalGutter' to 0. It is 4px by default.

$(paneElement).jScrollPane({
    verticalGutter: 0
});

应该做的窍门!

这篇关于jScrollPane:保证金问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆