0

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 へのリンク

4

1 に答える 1

0

これはまだ問題がありますか、それとも解決されましたか? あなたがこの質問をしたので、バージョン 1.2 がリリースされ、バージョン 1.1 とは動作が少し異なります。

あなたの質問では、CSS識別子「div.scrollableArea *」のアスタリスクを取り除くと、動作が停止すると述べています。この識別子は、「scrollableArea 内にあるあらゆるタイプの要素です。それを削除する場合は、より具体的なものに置き換える必要があります。画像がある場合は、「div.scrollableArea img」を使用します。div がある場合は、 「div.scrollableArea div」を使用します。リンクしたものがある場合は、「div.scrollableArea a」などを使用します。

重要なことは、scrollableArea 内にある要素が 1 つの長い行に表示されることです。これを達成するために私が使用した方法は、それらの位置を relativeにし、左にフロートさせ、 display プロパティを block に設定することです(要素が DOM で特定の水平スペースを要求するために必要です)。それとは別に、他のほとんどのものを自分の好みに合わせて設定できます。

于 2012-04-05T17:23:13.973 に答える