问题标签 [smooth-scrolling]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1186 浏览

java - Java 平滑 ArrayList 运动

目前我在我的程序中使用双缓冲(尽管你应该知道),并且我有一个存储 BufferedImages 和 Integers 的数组列表。目前我在屏幕上移动整个数组列表的代码是:

这可以完成工作,但看起来并不顺利。即使我使用 0.25 之类的数字作为可变数量。(我只是注意到我在代码中拼写错误:O)如果我的所有图像都在这个数组中,我如何做出漂亮的平滑运动?顺便说一句,如果您想知道这有什么不顺利,这是因为它滞后并且在每张图像之间您会看到一个很大的空白区域。感谢您提供任何帮助...谢谢!

渲染代码:

}

0 投票
2 回答
625 浏览

jquery - 停止连续滚动 smoothdivScroll

我正在使用 Thomas Kahn 的 smoothdivscroll,想知道如何停止连续滚动?

0 投票
1 回答
84 浏览

jquery - 使用 smoothdivscroll 构建页面

我访问了 Thomas Kahn 的实验室页面http://www.smoothdivscroll.com/lab.html以了解如何构建 html。在此实验室页面上,您可以做出很多选择。但是有没有一种简单的方法可以在代码中获得这些选择?或者我应该使用实验室页面的源代码来查找它?谁能给我建议?

吉斯

0 投票
1 回答
247 浏览

c# - 在两个列表框内平滑滚动

我有两个带有数据的堆叠列表框(第一个列表框包含 <10 个元素,第二个可能有多达 5000 个元素),第一个列表框的元素必须在顶部:

如何提高滚动性能?

我知道当我调用“ScrollViewer.SetVerticalScrollBarVisibility(sender as ListBox, ScrollBarVisibility.Disabled);”时我失去了 virtualizingPanel

但是当我需要两个 ListBox 时,有什么方法可以启用它吗?

0 投票
1 回答
2455 浏览

jquery - Smooth Div Scroll Jquery Plugin无限循环不起作用

我试图复制这个例子:

http://www.smoothdivscroll.com/clickableLogoParade.html

从插件。

但是,您会注意到,当滚动到达最后一个徽标“RADIO SHACK”时,它会停止。

我怎样才能使它成为一个真正的 ENDLESS 循环?

谢谢!

0 投票
2 回答
856 浏览

jquery - 如何为 smoothDivScroll 制作按钮

我想使用标签制作 2 个简单的可点击链接,以使用 Thomas Kahn 的 JQuery SmoothDivScroll 更改幻灯片的滚动方向。我想让向右和向左的滚动方向都成为可点击的链接,但不知道该怎么做。任何人都可以帮忙吗?

到目前为止我的代码在http://www.festifood.nl/test.html

谢谢

0 投票
1 回答
241 浏览

wpf - 列表框像 windows phone 一样滚动

我尝试使用(在 WPF 应用程序中)列表框,就像我在 Windows Phone 7.1 应用程序中使用的那样。

在我的 Wp7 应用程序中,滚动很流畅,我可以按住一个列表框并滚动它!

WPF可以做到吗?如果是,如何?例子?

0 投票
1 回答
14539 浏览

jquery - Adding swipe gestures to Smooth Div Scroll

I am trying to add swipe gestures to Smooth Div Scroll plugin by Thomas Kahn, since the plugin is not working on iPads and other smart devices.

Az first i was using hammer.js to add the functionality. This is the code i used on the container div that holds the images:

But unfortunately, the swipe worked once out of 10 times, and there is no way to stop in the middle, it would just slide to one end or the other.

I am interested if anyone has managed to add swipe functionality to Smooth Div Scroll, or if anyone has some other script to recommend for adding mobile gestures, that is maybe better than Hammer.js.

Here is the link to the website, it is still work in progress: http://www.madebym.net/test/index.html

p.s. right now i am using touchSwipe.js, but it seems worse than hammer.js...it doesn't do anything

0 投票
1 回答
482 浏览

jquery - Jquery 平滑滚动到元素偏移量

我已经使 scrollingHotSpot 左右区域不透明,这意味着当我加载页面时,第一个图像被切到左边。当我使用 scrollToElement 函数时会发生同样的问题。

为了修复被切断的第一张图像,我使用了这个,效果很好:

我的 scrollToElement 图像仍然被切断到左侧:

尝试使用以下方法,但没有解决问题:

非常感谢任何帮助,干杯!

0 投票
1 回答
350 浏览

jquery - 平滑滚动 jQuery 不适用于我的绝对定位按钮

我目前在我的主导航上使用 JS SmoothScroll 在一个单页网站上顺畅地导航。您可以在主导航上看到它工作正常。通过将 class="scroll" 添加到链接来调用它。脚本可以在这里看到。

我正在尝试为我的“返回顶部”功能使用相同的 javascript。目前,返回顶部功能运行良好,但它只是“捕捉”到顶部,所以我希望它像我的其他导航一样滚动。

但是,当我将 class="scroll" 添加到该链接时,它完全停止工作。