在jQuery中连续滚动包含图像的水平滚动条? [英] Continuously scrolling horizontal ticker containing images in jQuery?
问题描述
我想做类似的事情: http://javascript.about.com/library /blcmarquee1.htm
我引用的脚本似乎有点滞后(过时了?),所以我想知道是否有人知道更好的解决方案。 (jQuery解决方案欢迎。)
The script I referenced however seems to be a bit laggy (outdated?), so I was wondering if anyone knew of a better solution. (jQuery solutions welcome.)
推荐答案
刚刚发现这个 - jQuery驱动,并且有图像。我打算将它用于当前项目。
Just found this — jQuery-driven, and has images. I’m intending to use it for a current project.
http://logicbox.net/jquery/simplyscroll/
更新:我现在在生产代码中使用了它。该插件能够非常流畅地循环70 + 150×65px图像 - 我尝试过的其他一些插件都是失败的。
UPDATE: I have now used this in production code. The plugin is capable of looping 70+ 150×65px images pretty smoothly - which a number of another plugin I tried similar to this were failing on.
注意它会造成严重破坏IE 6/7中的 z-index
问题并没有出现等等 - 但这也可能部分归因于我的CSS。对于那些在IE中根本没有出现问题的人,请查看标准IE z-index
修复: http://www.google.com/search?q=ie+z+index+issues
NOTE it reeked havoc with z-index
issues in IE 6 / 7 and was not showing up etc. - But this might also have been partly due to my CSS. To anyone having trouble with it not showing up at all in IE check out the standard IE z-index
fixes: http://www.google.com/search?q=ie+z+index+issues
最新更新:
实现这些插件时需要考虑的事项:
LATEST UPDATE: Addition things to consider when implementing plug-ins like these:
- 要滚动的项目数和内容类型。我发现一个数字会在你有超过15个图像滚动时开始出现故障。
- 我发现其中一些插件与旧版本的jquery相关 li>
- 如果滚动图像又是他们所有相同尺寸的话,我试验的一些插件只有在所有图像大小相同但在教程中没有明确说明时才能使用。我相信然后插件运行然后设置一个所有x宽的li标签字符串然后计算所有链接在一起的总距离来管理滚动。
- 效果 - 有些会连续滚动其他人会移动一个图像暂停一秒然后移动另一个图像
- The number of items and type of content to scroll. I found a number that would start to glitch as soon as you had more than say 15 images to scroll.
- I found a number of these plugins that were tied to old versions of jquery
- If scrolling images ARE THEY ALL THE SAME SIZE again a number of the plug-ins I experimented with only worked if all the images were the same size but did not make this clear in the tutorials. I believe then the plugins run then set a string of li tags that are all x wide then calculate the total distance of them all chained together to manage the scrolling.
- Effects - some would continuously scroll others would move one image pause for a second then move another image
我现在也发现这两个滚动插件非常好好吧。
I have now also found these two scroller plugins to be very good as well.
http://caroufredsel.frebsite.nl/
http://sorgalla.com/ jcarousel /
这篇关于在jQuery中连续滚动包含图像的水平滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!