Smooth Div Scroll非常棒,但由於某些原因,當我編輯或刪除#makeMeScrollable或#makeMeScrollable div.scrollableArea * 時,該區域不再滾動。這是定製問題。Smooth Div滾動jquery不滾動
和我拍照後,它不會工作的「*」出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/
// ^上面的鏈接我談論
沒有問題沒有解決,因爲我從來不知道該怎麼處理代碼。具體來說,我不知道我會用什麼來取代「*」。它剛剛被凍結並卡住了。如果我將它剝離成最基本的形式,它只會滾動,但我的div不會出現,它會滾動並以錯誤的方式。它只會顯示圖像。對於我自己使用這個jQuery我用它來滾動我的div和圖像和列表。它從來沒有爲我工作。它是被凍結的(不是自動滾動或手動滾動,或者會滾動而不是代碼的意圖) – Razor
當涉及到放置在可滾動區域內的項目的CSS時,重要的是它們需要聲明它們的佈局空間(display:block),並且它們需要位於一個long line(float:left)。你在可滾動區域中是否有混合內容?在這種情況下,你要麼將每個元素包裝在一個div中並設置CSS選擇器到「div.scrollableArea div」,或者你需要幾個選擇器(每個元素類型一個)「div.scrollableArea div,div.scrollableArea img,div.scrollableArea a」等等。你提到你有一個列表可滾動的區域?它是否包裹在一個div? – tkahn
嘿,謝謝你的迴應!所以基本上我有所有的混合內容img,ul,li,divs都包裹在另一個div中,在scrollableArea內嗎?或者我必須將每個單獨的物品包裝在它自己的d中iv它的工作?列表本身被封裝在div中的div主div中。scrollableArea – Razor