0
我已經爲jscrollpane創建了一個自定義滾動條,它看起來工作正常,直到我滾動到結尾,並且在結束之前停止,就像它卡住了一樣。我希望它能夠結束,以便人們知道沒有更多可以滾動的東西。我改變的唯一CSS樣式是jspHorizontalBar,jspTrack,jspDrag。自定義水平滾動條不會走到軌道的盡頭
/*
* CSS Styles that are needed by jScrollPane for it to operate correctly.
*
* Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane
* may not operate correctly without them.
*/
.jspContainer
{
overflow: hidden;
position: relative;
}
.jspPane
{
position: absolute;
}
.jspVerticalBar
{
position: absolute;
top: 0;
right: 0;
width: 16px;
height: 100%;
background: red;
}
.jspHorizontalBar
{
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 25px;
background-color: #fff;
}
.jspVerticalBar *,
.jspHorizontalBar *
{
margin: 0;
padding: 0;
}
.jspCap
{
display: none;
}
.jspHorizontalBar .jspCap
{
float: left;
}
.jspTrack
{
background: #fff;
position: relative;
background-image:url(../images/track.gif);
background-repeat: repeat-x;
}
.jspDrag
{
position: relative;
top: 10px;
left: 0;
cursor: pointer;
background-image:url(../images/move_me.jpg);
background-repeat:no-repeat;
border: 0px;
}
.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;
}
.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;
}
當我使用firebug來檢查元素時,它告訴我jspDrag和.jspDrag .jspHover和.jspDrag .jspActive類的寬度爲420px,但是當我將它添加到jScrollPane Css樣式時,沒有任何更改 - 我是什麼失蹤?謝謝 – kas 2012-02-13 23:54:09
對不起,沒有更快的反應。雖然您可能已經在.CSS文件中設置了對象的CSS。當我查看元素時,它具有INLINE寬度。這意味着設置元素的寬度,無論是JavaScript,PHP,還是將其寫入HTML文件中的元素。 – Ohgodwhy 2012-02-14 05:22:18