复制时的 3d 视口 jquery 问题
该问题仅在 FF 和 Chrome 中仍然存在。 Hughes 为 IE 修复了这个问题
我目前正在一个网站上工作,我使用视差效果来伪造 3D 效果。 我使用的脚本是 smart3d
(jQuery 插件)。
我制作的第一张幻灯片效果很好(尽管由于某种原因 100% 宽度实际上并不是 100%)。如果我复制它,它在悬停时会向右侧移动更多。如果我再次复制它......它会改变更多。
我找不到问题所在,所以我决定向你们寻求帮助。 您可以在这里查看问题: http://basenharald.nl/3d/
我将边框放在几个LI
项目,这样我的意思就变得更清楚了。
希望你们能帮忙。
顺便说一句:当我使用 px
而不是 %
时,我遇到了同样的问题,所以这不是答案。
The problem only still excists in FF and Chrome. Hughes fixed it for IE
I am currently working on a website where i use a Parallax effect to fake a 3D effect.
The script that i am using is smart3d
(jQuery plugin).
The first slide that i made works fine (allthough the 100% width isnt actually 100% for some reason). If i duplicate it it shifts more to the right side when hovering. if i duplicate it again... it shifts even more.
I cannot find what the problem is so i decided to ask you guys for help.
You can view the problem here: http://basenharald.nl/3d/
I put the borders on the several LI
items on so it becomes clearer what i mean.
hope you guys can help.
BTW: i get the same problem when i use px
instead of %
so that is not the answer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是 smart3d 中的一个错误。它可以正确调整垂直滚动,但不考虑水平滚动。我找到了相关代码,这里是如何修复它的说明。
打开文件 jquery.smart3d.js,在第 69 行左右,您会发现我们将 mousemove 函数绑定到 smart3d 容器的位置:
我们需要做的是考虑水平滚动,就像它已经对垂直滚动所做的那样。将函数更改为:
保存文件并重新加载页面。
这应该可以解决您的问题,因为它与脚本处理垂直偏移的方式相同。不过我自己还没试过!
This is a bug in smart3d. It correctly adjusts for vertical scrolling, however it does not account for horizontal scrolling. I've found the relevant code, and here are instructions for how you can fix it.
Open up the file jquery.smart3d.js, and around line 69 you will find where we bind the mousemove function to the smart3d container:
What we need to do is account for horizontal scroll, just as it already does for the vertical scroll. Change the function to read:
Save the file and reload your page.
This should fix your problem, since it's the same way the script handles vertical offset. I haven't tried it myself though!
我给作者发了邮件,过了一会儿他就帮我修好了。新下载没有这个问题:http://4coder.info/en /code/jquery-plugins/smart3d/download/
I mailed the author and after a while he fixed it for me. The new download does not have this problem: http://4coder.info/en/code/jquery-plugins/smart3d/download/