当前位置: 首页 > wzjs >正文

昆明网站建设公司哪里有市场营销培训班

昆明网站建设公司,哪里有市场营销培训班,网络营销的应用研究论文,做uml图网站AI不会取代人类,被取代的是不会使用AI 的人 0%~100% 是动画运动的时长,通过约定多1/4的时间Y轴的位置,来控制动画的停留。 /* 通过间隔做 暂停 */ keyframes ad_move {0% {transform: translateY(0px);}25%{transform: translateY(0px);}50%…

AI不会取代人类,被取代的是不会使用AI 的人

0%~100% 是动画运动的时长,通过约定多1/4的时间Y轴的位置,来控制动画的停留。

/* 通过间隔做 暂停 */
@keyframes ad_move {0% {transform: translateY(0px);}25%{transform: translateY(0px);}50%{transform: translateY(calc(var(--y)/2));}75%{transform: translateY(calc(var(--y)/2));}100% {transform: translateY(var(--y));}
}

好消息是,写完啦。
坏消息是👇
请添加图片描述
那translate 总支持吧。
于是,我迅速安装了animejs,并自信的写了两种方式

animeRef.current = anime({targets: el,// translateY: [0, -2 * height],translateY: [{ value: 0, duration: 1000, delay: 750, easing: 'linear' },{ value: -height, duration: 1000, delay: 1750, easing: 'linear' },{ value: -2 * height, duration: 1000, delay: 2750, easing: 'linear' },],// keyframes: [//   { translateY: 0 },//   { translateY: 0 },//   { translateY: -height },//   { translateY: -height },//   { translateY: -2 * height }// ],duration: 8000,loop: true,easing: 'linear'})

😭,结果被告知

Native 的组件(如 View、Text)并非 DOM 元素,且其样式系统与 Web 的 CSS 有本质差异。
Anime.js 是一个基于浏览器 DOM 和 CSS 的 Web 动画库

好吧,从控制台看,我看着是div呀。
😭,只得老老实实的使用 react-native-reanimated,在短时间内实现我的需求,是有点费事儿的。

最近流行一句:不会被取代的人是,会使用AI的人。

于是,deepseek 两秒帮我写完了。

import { View, Text } from 'components/ui';
import React from 'react';
import { useEffect, useMemo } from 'react';
import { useWindowDimensions, ViewProps } from 'react-native';
import Animated, {useSharedValue,withTiming,withDelay,withSequence,Easing,withRepeat
} from 'react-native-reanimated';const height = 64const MyView = React.forwardRef((props: ViewProps, ref: React.LegacyRef<View>) => {const { width } = useWindowDimensions();const height = 64return (<View ref={ref} {...props}><View style={{ height: `${height}px` }} className='bg-pink-600 w-full'><Text>山上有樱名为良,树本无形只待春</Text></View><View style={{ height: `${height}px` }} className='bg-pink-200'><Text>山上有樱名为良,树本无形只待春</Text></View><View style={{ height: `${height}px` }} className='bg-pink-600'><Text>山上有樱名为良,树本无形只待春</Text></View><View style={{ height: `${height}px` }} className='bg-pink-200'><Text>山上有樱名为良,树本无形只待春</Text></View></View>);}
);const AnimatedView = Animated.createAnimatedComponent(MyView);export function Test2() {const { width } = useWindowDimensions();const sharedValue = useSharedValue(0);useEffect(() => {if (!height) return;// 定义动画的总距离const totalDistance = -2 * height;// 定义每 1/2 的距离const halfDistance = totalDistance / 2;// 使用 withSequence 实现分段动画const animation = withSequence(// 暂停 2 秒withDelay(2000, withTiming(0, { duration: 0 })), // 保持当前位置// 第一段动画:运动 1/2withTiming(halfDistance, {duration: 2000, // 4 秒完成 1/2 的距离easing: Easing.linear,}),// 暂停 2 秒withDelay(2000, withTiming(halfDistance, { duration: 0 })), // 保持当前位置// 第二段动画:运动剩余的 1/2withTiming(totalDistance, {duration: 2000, // 4 秒完成剩余的 1/2 的距离easing: Easing.linear,}));// 使用 withRepeat 实现循环sharedValue.value = withRepeat(animation, -1, false);}, [height, sharedValue]);return (<View className='w-full'><View style={{ height: `${height}px`, overflow: 'hidden' }} className='w-full'><AnimatedView style={{ transform: [{ translateY: sharedValue }] }} /></View></View>);
}
http://www.dtcms.com/wzjs/827500.html

相关文章:

  • 响应式网站建设系统开票开网站建设费
  • 百度搜索引擎网站京北网app下载
  • 柳州市建设投资开发公司网站何苦做游戏网站
  • 万网网站模板购买大气装饰公司网站源码
  • 免费国外网站北京广告设计制作公司
  • 濮阳网站建设电话asp婚纱摄影网站
  • 做网站为什么用phpseo流量工具
  • 做外贸业务去哪些网站做网站只开发手机端可不可以
  • 公司网站怎么做包括什么wordpress右浮动图
  • 网站备案 有什么用网站建设需要注册42类吗
  • 建设银行宁波分行 招聘网站厦门网站定制
  • 做网站备案不少天动画素材
  • 移动网站功能免费制作图片的app
  • 务分销系统电子商务网站seo
  • 兰州网站移动端优化aspmysql做网站
  • 门户网站需要多少空间中山地区做网站公司
  • 提交网站的入口地址肇庆企业建站程序
  • 南京做中英文网站网站建设需要服务器空间
  • 怎么不花钱做公司网站微网站建设云帆网络
  • 鞍山建设网站开发手机app需要学什么知识
  • 不懂英文怎么做英文的seo网站伏羲方舟网站建设
  • 申报课题所需的网站怎么做西安网站开发公司有哪家好
  • 90设计网站可以商用吗wordpress播放没声音
  • 营口规划建设局网站本溪做网站
  • 网站后台是怎么做出来的贵州网站建设价格
  • 网站建设的方式有哪些ico网站进行推广
  • 如何查询一个网站的空间大小成立
  • 地方房地产网站网站改自适应 做自适应
  • 一般网站建设多少钱便宜的网站好吗抚顺网站建设7113
  • 永康网站建设优化建站自己可以做类似拓者的网站吗