【问题标题】:jQuery smooth div scroll scrolling speed much faster on the left than on the rightjQuery 平滑 div 滚动滚动速度左边比右边快很多
【发布时间】:2012-05-31 14:02:06
【问题描述】:

我目前正在尝试使用 Smooth Div Scroll (http://www.smoothdivscroll.com/) 在网站上制作“全屏”作品集。我有一个问题,左侧滚动比右侧滚动快得多。我在演示中注意到它们的速度相同,我无法弄清楚为什么它对我的生活不起作用。我在下面粘贴了 CSS 和 JS。我还提供了该网站的链接。如果有人对我如何解决这个问题有任何想法,我将不胜感激!

CSS:

div#full-screen-portfolio {
    width: 100%;
    height: 100%;
    overflow-y: hidden;
}

div.scrollWrapper
{
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

div.scrollableArea
{
    position: relative;
    width: auto;
    height: 100%;
}

div.scrollingHotSpotLeftVisible
{
    width: 130px;
    height: 200px;
    top: 50%;
    margin-top: -100px;
    left: 20px;
    position: absolute;
    z-index: 1000;
    background: url(images/full-screen-arrow-left.png) transparent no-repeat center center;
    zoom: 1; /* Trigger "hasLayout" in Internet Explorer 6 or older versions */
}

div.scrollingHotSpotRightVisible
{
    width: 130px;
    height: 200px;
    top: 50%;
    margin-top: -100px;
    right: 20px;
    position: absolute;
    z-index: 1000;
    background: url(images/full-screen-arrow-right.png) transparent no-repeat center center;
    zoom: 1;
}

body.full-screen-portfolio div#back-button {
    position: absolute;
    z-index: 1000;
    top: 30px;
    left: 30px;
}
body.full-screen-portfolio div#contact-us-area {
    position: absolute;
    bottom: 50px;
    left: 0;
    z-index: 1000;
}
body.full-screen-portfolio div#contact-us-area ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
body.full-screen-portfolio div#contact-us-area ul li {
    float: left;
    height: 91px;
}

JS:

$("#full-screen-portfolio").smoothDivScroll({
    visibleHotSpotBackgrounds: "always",
    hotSpotScrollingStep: 100
});

网站:

http://lightboxwebsitedesign.co.uk/newsite/full-screen-portfolio/

【问题讨论】:

    标签: jquery smooth-scrolling


    【解决方案1】:

    尝试将其添加到您的 CSS 文件中:

    div.scrollingHotSpotLeft
    {
        width: 10%;
    }
    

    【讨论】:

      【解决方案2】:

      如果升级到SmoothDivScroll 1.3,您是否仍然遇到此问题?无论如何,您都应该考虑进行此升级,因为 Smooth Div Scroll 现在支持触摸滚动,这对于访问您网站的 iPad 用户来说非常有用。

      【讨论】:

        【解决方案3】:

        我在 IE7 (SDS 1.3) 中发现了同样的效果。似乎左侧热点以恒定速度滚动 - 最高 - 并且没有考虑鼠标在自身内部的位置。

        测试页面 - http://ateliermoscow.com/ru/collections/osenzima12-13lookbook/

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2013-10-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2021-09-19
          相关资源
          最近更新 更多