cost 317 ms
Framer Motion 返回拖动按钮 - Framer Motion return drag button

我有可以使用成帧器运动拖动来移动的对象。 我怎样才能制作一个按钮将所有元素返回到它们的初始 position? 我试着用动画来做,但 animation 又尖又丑。 我认为这是因为当你释放元素时,它仍然会在空间中“漂浮”一段时间,并且在 animation 继续这样做之后。 ...

如何制作成帧器运动 Slider 在按下按钮时拖动和移动 - ReactJS - How to Make a Framer Motion Slider With Drag and Move on Button Press - ReactJS

我是一名新开发人员,我想知道如何在按下按钮时移动 translateX 而不会破坏 slider 对拖动的约束。 我得到了拖累,但它只是实现了按钮,这让我感到困惑。 Slider 图片: 代码一团糟,因为我快疯了。 我只是想让它在每次按下按钮时将它的 X 移动一些像素,然后在 slider 结束 ...

成帧器运动 whileInView 在组件进入视口之前激活 - Framer motion whileInView activating before component is in viewport

我正在尝试使用 Framer Motion 制作一个简单的 animation,其中一个组件漂浮在其中并从左侧变为不透明。 该组件位于英雄部分的正下方,但在页面顶部时不会出现在视口中(英雄部分是整个视口高度)。 该组件与英雄部分位于单独的 div 中。 请注意,如果这与此有关,我正在使用 Chakr ...

React Framer-motion AnimatePresence 退出 animation 不起作用 - React Framer-motion AnimatePresence exit animation does not work

我正在尝试为一些页面转换设置动画,但由于某种原因,只有输入 animation 有效。 文本正确滑入,但在路由到另一个组件时不会滑出,而是消失了。 我已经尝试使用 location.pathname 将键分配给各个组件,也尝试将键分配给 Outlet 组件,在 AnimatePresence 和 m ...

为什么我的 Framer Motion animation 发生两次? - Why is my Framer Motion animation happening twice?

我在徽标上有一个 animation,我希望在将鼠标悬停在该徽标上时发生。 这是CodeSandbox 演示。 当前行为:当您在徽标上输入 hover 时,会出现正确的 animation。 当您离开徽标时,中间路径会再次旋转。 预期行为:Animation 发生在 hover 上,当鼠标不再悬停 ...

如何使用 AnimatePresence 实现干净的进入和退出? - How to use AnimatePresence for clean entry and exit?

我正在尝试使用 Framer Motion 的 AnimatePresence 组件在我的下一个应用程序中进行干净的进入/退出 animation。 我试过使用延迟组件,但只适用于一个组件。 对于其他组件,它们只是消失而没有任何 animation。预期行为和当前行为如下所示: 预期和工作行为 ...

使用 Framer Motion 的动画高度在 React 中不起作用 - Animating height using Framer Motion not working in React

所以,我一直在尝试为我的 React 项目使用 Framer Motion。 当 div 被渲染时,我基本上想将高度从 0 动画化到“自动”。 我试过下面的代码,但高度没有得到动画 当我用宽度替换高度时,animation 工作正常,但无法弄清楚为什么高度没有动画。 而且我找不到与此相关的任何适当文 ...

在 Framer motion react 中使用 animation 跟随鼠标 - Follow mouse with animation in Framer motion react

我的 React 应用程序中有一个自定义 cursor 组件。 为了在视口内实现平滑过渡,我使用了成帧器运动。 鼠标下的 div 有一些自定义样式,它遵循 cursor 没有任何问题。 但我希望该 div 始终具有动画效果,例如旋转 + 更改边框半径,甚至还更改 bg 颜色。 从 framer mo ...

顺利展开 Div 以顺风顺风不发生 - Expand Div smoothly in react with tailwind not happening

我正在尝试为包含我的输入元素的 div 制作动画,它应该平滑展开,文本区域起初很小,其他两个输入和按钮被隐藏,当单击文本区域输入和按钮时显示,但是没有过渡,只是尺寸的跳跃,我尝试使用 framer motion 但它不接受 tailwindcss 值,将转换 class 放在父 div 中也没有帮助 ...

如何停止 framer motion animation 在每次重新渲染时运行 - how to stop framer motion animation run on every re rendering

我正在为 animation 使用 framer motion,我的问题是 animation 在我的页面上每次重新渲染时都会触发。 我想要的行为是 animation 在页面进入或重新加载时仅一次,而不是通过重新呈现。 这是我的组件: 我在这个组件中有一些 state 可能会导致重新呈现页面,它会 ...

安装或卸载组件时 Framer Motion 没有动画 - Framer Motion not animating when mount or unmounting a component

我正在使用 framer motion 为自定义表格行设置动画,只要它们被安装。 但它不是动画。 当我检查 web 时,他们指定 AnimatePresence 应该是运动的直接父级。 它应该有一个键值。 仍然不起作用。 我不确定我错过了什么。 请指教。 谢谢。 ...

更改背景图像向后移动的文本颜色 - Change text color where the background image moves behind

背景 pl.net 在一个圆形区域内移动,如果图像向后移动,则将文本颜色更改为橙色。 Pl.net组件: 和背景图像样式: 图像我想要什么文本应该随着 pl.net 的移动而改变颜色。 要移动 pl.net,我使用 framer-motion 库。 还有视频以便更好地理解: video Is it ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM