diff --git a/src/pages/home/index.jsx b/src/pages/home/index.jsx index 56a64c19..74b26102 100644 --- a/src/pages/home/index.jsx +++ b/src/pages/home/index.jsx @@ -187,7 +187,7 @@ const Home = () => {
-
+
@@ -268,14 +268,14 @@ const Home = () => {
-
+
{ mask
-
-
-
-
-
+
+
+
+
@@ -382,20 +382,20 @@ const Home = () => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/motion/index.jsx b/src/pages/motion/index.jsx index 2c6dbd9a..75663b36 100644 --- a/src/pages/motion/index.jsx +++ b/src/pages/motion/index.jsx @@ -69,7 +69,7 @@ const easeNames = [ ] const randomSort = (arr) => { - let newArr = [] + const newArr = [] const len = arr.length for (let i = 0; i < len; i++) { const random = Math.floor(Math.random() * arr.length) @@ -158,9 +158,9 @@ const ParallaxVert = () => { backgroundColor: '#aaa', borderRadius: '3px', // scaleX: scrollYProgress, - scaleX: scaleX, + scaleX, }} - > + /> { rotate: 45, // 旋转45度 opacity: 0.5, // 不透明度设置为0.5 }} - > + /> { rotate: 0, x: '200px', }} - > + /> { duration: 2, }} variants={animations} - initial={'hidden'} - animate={'show'} - > + initial="hidden" + animate="show" + /> { onClick={() => { setRotate(!isRotated) }} - > + /> {/*
{ setIsAnimation(false) console.log('Completed animating', definition) }} - > + />
{ onDragStart={(event, info) => console.log(info.point.x, info.point.y)} onDragEnd={(event, info) => console.log(info.point.x, info.point.y)} onDirectionLock={(axis) => console.log('axis', axis)} - dragSnapToOrigin={true} + dragSnapToOrigin // dragConstraints={{ left: 0, right: 300 }} dragConstraints={constraintsRef} - // dragElastic={false} - // dragElastic={0.8} - // dragPropagation={false} - > + />
{ backgroundColor: 'white', borderRadius: 60, }} - > + />
scrollDirection: {scrollDirection}
@@ -565,7 +562,7 @@ const ParallaxVert = () => { x, rotate, }} - > + /> { borderRadius: '20px', scaleX, }} - > + />
{ backgroundColor: '#fff', borderRadius: 10, }} - > + /> { backgroundColor: '#fff', borderRadius: 10, }} - > + />