[英]Smooth Div Scroll jquery not scrolling
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 我在說
這仍然是一個問題還是已經解決了? 既然你問了這個問題,1.2 版已經發布,它的工作方式與 1.1 版有點不同。
在您的問題中,您提到當您取出 CSS 標識符“div.scrollableArea *”中的星號時,事情會停止工作。 這個標識符只是說“可滾動區域內的任何/任何類型的元素。如果你刪除它,你需要用更具體的東西替換它。如果你有圖像,你使用“div.scrollableArea img”。如果你有 div使用“div.scrollableArea div”,如果你有鏈接的東西你使用“div.scrollableArea a”等等。
重要的是,可滾動區域內的元素以一長行顯示。 我用來完成此操作的方法是使它們的position 相對,將它們向左浮動並將它們的顯示屬性設置為阻塞(需要元素在 DOM 中聲明它們的特定水平空間)。 除此之外,您幾乎可以根據自己的喜好設置任何其他內容。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.