Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用很棒的插件Pep.js来拖动东西。
我有 3 张可拖动的卡片,当它离开屏幕时,它需要自动刷新,所以它又回到了开始的地方。这可以用 JavaScript 或 Ajax 实现吗?
请帮忙。谢谢。
这可以解决您的问题: http ://upshots.org/javascript/jquery-test-if-element-is-in-viewport-visible-on-screen
该脚本检查元素是否在视口中。