Smooth Div Scroll很棒,但由于某些原因,当我编辑或删除#makeMeScrollable或#makeMeScrollable div.scrollableArea *时,该区域不再滚动 当我离开它时,它是有效的。这是定制问题。
从div.scrollableArea *
中取出“*”后它将无效如果我使用
编辑部件令人沮丧的是弄清楚为什么应该可编辑的部分根本不起作用。
对此jquery的任何帮助都会有所帮助!提前谢谢!
/* You can alter this CSS in order to give SmoothDivScroll your own look'n'feel */
/* Invisible left hotspot */
div.scrollingHotSpotLeft
{
/* The hotspots have a minimum width of 75 pixels
and if there is room the will grow and occupy 10%
of the scrollable area (20% combined).
Adjust it to your own taste. */
min-width: 75px;
width: 10%;
height: 100%;
/* There is a big background image and it's used to
solve some problems I experienced in Internet Explorer 6. */
background-image: url(../images/big_transparent.gif);
background-repeat: repeat;
background-position: center center;
position: absolute;
z-index: 200;
left: 0;
/* The first cursor url is for Firefox and other
browsers, the second is for Internet Explorer */
cursor: url(../images/cursors/cursor_arrow_left.cur), url(images/cursors/cursor_arrow_left.cur),w-resize;
}
/* Visible left hotspot */
div.scrollingHotSpotLeftVisible
{
background-image: url(../images/arrow_left.gif);
background-color: #fff;
background-repeat: no-repeat;
/* Standard CSS3 opacity setting */
opacity: 0.35;
/* Opacity for really old versions of
Mozilla Firefox (0.9 or older) */
-moz-opacity: 0.35;
/* Opacity for Internet Explorer. */
filter: alpha(opacity = 35);
/* Use zoom to Trigger "hasLayout" in
Internet Explorer 6 or older versions */
zoom: 1;
}
/* Invisible right hotspot */
div.scrollingHotSpotRight
{
min-width: 75px;
width: 10%;
height: 100%;
background-image: url(../images/big_transparent.gif);
background-repeat: repeat;
background-position: center center;
position: absolute;
z-index: 200;
right: 0;
cursor: url(../images/cursors/cursor_arrow_right.cur), url(images/cursors/cursor_arrow_right.cur),e-resize;
}
/* Visible right hotspot */
div.scrollingHotSpotRightVisible
{
background-image: url(../images/arrow_right.gif);
background-color: #fff;
background-repeat: no-repeat;
opacity: 0.35;
filter: alpha(opacity = 35);
-moz-opacity: 0.35;
zoom: 1;
}
/* The scroll wrapper is always the same width and
height as the containing element (div). Overflow
is hidden because you don't want to show all of
the scrollable area.
*/
div.scrollWrapper
{
position: relative;
overflow: hidden;
width: 100%;
height: 100%;
}
div.scrollableArea
{
position: relative;
width: auto;
height: 100%;
}
#makeMeScrollable
{
width:100%;
height: 330px;
position: relative;
}
#makeMeScrollable div.scrollableArea *
{
position: relative;
float: left;
margin: 0;
padding: 0;
}
http://www.smoothdivscroll.com/
// ^上面链接到我正在谈论的jquery
答案 0 :(得分:0)
这仍然是一个问题还是已经解决了? 由于您提出此问题,因此版本1.2已发布,其工作方式与版本1.1略有不同。
在你的问题中,你提到当你在CSS标识符“div.scrollableArea *”中取出星号时,事情就会停止工作。这个标识符只是说“scrolllableArea中的任何/任何类型的元素。如果你删除它,你需要用更具体的东西替换它。如果你有图像你使用”div.scrollableArea img“。如果你有div的你使用“div.scrollableArea div”,如果你有链接的东西你使用“div.scrollableArea a”等等。
重要的是,scrollableArea中的元素显示在一个长行中。我用来实现这个目的的方法是让他们的位置相对,浮动他们并将他们的显示属性设置为阻止(需要在DOM中声明其特定水平空间的元素。除此之外,你可以根据自己的喜好设置其他任何东西。