gsap实现小球弹跳上楼梯动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap实现小球弹跳上楼梯动画效果代码

代码标签: 跳上 楼梯 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  
  
  
  
<style>
body {
	background: #1e1f26;
	display: grid;
	align-content: center;
	justify-content: center;
	width: 100%;
	height: 100vh;
}
svg #steps path:last-child {
	opacity: 0;
}
</style>


</head>


  <body>
	<svg id="loader" class="animated" viewBox="-50 -50 100 100" style="max-width: 600px; z-index:999; width:100vw;">
		<!-- 		<g id="grid" stroke="rgba(255,255,255,0.2)" stroke-width=".1">
			<path d="M-50 -40 H50 M-50 -30 H50 M-50 -20 H50 M-50 -10 H50 M-50 10 H50 M-50 20 H50 M-50 30 H50 M-50 40 H50 M-40 -50 V50 M-30 -50 V50 M-20 -50 V50 M-10 -50 V50 M10 -50 V50 M20 -50 V50 M30 -50 V50 M40 -50 V50" />
			<path d="M-50 0 H50" stroke-width="0.3" />
			<path d="M0 -50 V50" stroke-width="0.3" />
		</g> -->
		<g id="steps" stroke="rgba(255,255,255,0.2)" stroke-width="1" fill="none">
			<path d="M-25,30 -15,30 -15,20" />
			<path d="M-15,20 -5,20 -5,10" />
			<path d="M-5,10 5,10 5,0" />
			<path d="M5,0 15,0 15,-10" />
			<path d="M15,-10 25,-10 25,-20" />
			<path d="M25,-20 35,-20 35,-30" />
		</g>
		<circle id="ball" fill="goldenrod" cx="0" cy="-12" r="4" />
		<!-- 		<g id="points" fill="hsl(25,100%,50%)">
			<circle cx="-20" cy="0" r="1" />
			<circle cx="0" cy="0" r="1" />
			<circle cx="20" cy="0" r="1" />
		</g> -->
		<!-- 		<g id="arc" fill="none">
			<path id="arc" d="M-20 0 A20 20, 0, 0 1, 20 0" stroke="rgba(255,255,255,0.4)" stroke-linecap="round" style="stroke-width:7;" />
			<animateTransform attributeName="transform" type="rotate" from="0 0 0" to="-360 0 0" begin="4s" dur="10s" repeatCount="indefinite" />
		</g> -->
		<!-- 		<g id="dots" fill="whitesmoke">
			<circle cx="-14" cy="-14" r="3.5" />
			<circle cx="-14" cy="14" r="3.5" />
			<circle cx="14" cy="-14" r="3.5" />
			<circle cx="14" cy="14" r="3.5" />
			<circle cx="0" cy="-20" r=&quo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0