如何为“mousemove”添加缓动效果画廊缩略图
在我尝试解释这一切之前,请先看看我在说什么。这是画廊的缩略图。在 mouseenter 上,它开始移动,但没有任何平滑的缓动效果。我认为这让它看起来很“紧张”。
请查看这里: http://mark-i-mark.com/lab/test/index.html
可以在此处查看“运行”mousemove 函数的代码片段: http://jsfiddle.net/nWMY9/
有没有人有一个好主意如何使其更加流畅,基于关于 jQuery 缓动插件?非常感谢帮助。如果您需要更多信息,请告诉我。
编辑2011年12月5日 *@roXon* 您的解决方案正是我所需要的。为了通过图库脚本实现这一点,我想稍微更新一下信息。也许你可以让它发生。 可以在此处找到图库的实时预览: http://mark-i-mark.com/lab/smartajax/index.html
js 文件是 jquery.dob.WallGridGallery.js,mousemove 函数从第 553 行开始,到第 595 行结束。现在看起来比上一个版本更有条理。
大多数尺寸都是由脚本动态设置的。可以在 xml 文件中进行可选设置: http://mark-i-mark.com/lab/smartajax /WallGridGallery/xml/SettingsWallGridGallery.xml
如果未进行任何设置,它将采用您为 #galleryContainer 设置的图库的可见大小html 标记,但缩略图包装器的尺寸是动态计算的。
目标是将您很酷的运动解决方案包含在现有脚本中。你认为你能做到吗?我希望我已提供您可能需要的所有信息,否则请告诉我。感谢您与我分享这一挑战。我认为包含您的解决方案后,画廊看起来会好得多。
Before I try to explain it all, please view here what I am talking about. This is the thumbnail view of a gallery. On mouseenter it starts moving but without any smooth easing effect. I think that makes it look very "nervous".
Please view here:
http://mark-i-mark.com/lab/test/index.html
The code snippet that is "running" the mousemove function can be viewed here:
http://jsfiddle.net/nWMY9/
Does have anybody a nice idea how to make it more smooth, based on the jQuery easing plugin? Help is really appreciated. If you need more info, please let me know.
EDIT 05.12.2011
*@roXon*
Your solution is exactly what I need. To make that happen with the gallery script, I want to update the information a little bit. Maybe you can make it happen.
A live preview of the gallery can be found here:
http://mark-i-mark.com/lab/smartajax/index.html
The js file is jquery.dob.WallGridGallery.js, the mousemove function starts at row 553 and ends at row 595. It now looks more organized that the last version.
Most of the dimensions are set dynamically by the script. Optional settings can be made in the xml file:
http://mark-i-mark.com/lab/smartajax/WallGridGallery/xml/SettingsWallGridGallery.xml
If no settings are made, it takes the visible size of the gallery from what you have set for the #galleryContainer in the html markup BUT the dimensions of the thumbnailsWrapper is calculated dynamically.
The goal would be to include your cool movement solution in the existing script. Do you think you could do that? I hope I have provided all information you may need, otherwise let me know. Thanks for sharing that challenge with me. I think that the gallery would look so much better with your solution included.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论