svg实现小球从洞中跳出进入另外洞中动画代码
代码语言:html
所属分类:动画
代码描述:svg实现小球从洞中跳出进入另外洞中动画代码
代码标签: svg 小球 从 洞中 跳出 进入 另外 洞中 动画 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
background: linear-gradient(to top right, #123, #789);
height: 100vh;
margin: 0 auto;
}
svg {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
max-height: 100vh;
max-width: 100vw;
}
</style>
</head>
<body translate="no">
<svg viewBox="0 0 100 100">
<defs>
<filter id="blur" x="-100%" y="-100%" width="300%" height="300%">
<feOffset in="SourceGraphic" dx="0" dy=".2" result="upMe" />
<feGaussianBlur in="upMe" in2="upMe" stdDeviation=".4"/>
</filter>
<radialGradient id="holegrad" cx="0.5" cy="0.8" fx="0.5" fy="0.9" fr=".9">
<stop offset="0%" stop-color="rgba(50,100,150,0)" />
<stop offset="100%" stop-color="rgba(0,0,0,1)" />
</radialGradient>
<radialGradient id="ballgrad" cx="0.5" cy="0.8" fx="0.5" fy="0.9" fr=".9">
<stop offset="0%" stop-color="rgba(50,100,150,1)" />
<stop offset="70%" stop-color="rgba(50,50,150,1)" />
<stop offset="100%" stop-color="rebeccapurple" />
</radialGradient>
<radialGradient id="ballgrad2" cx="0.5" cy="0.8" fx="0.5" fy="0.9" fr=".9">
<stop offset="0%" stop-color="rgba(30,90,140,1)" />
<stop offset="70%" stop-color="rgba(30,90,140,1)" />
<stop offset="100%" stop-color="steelblue" />
</radialGradient>
<radialGradient id="ballgrad3" cx="0.5" cy="0.8" fx="0.5" fy="0.9" fr=".9">
<stop offset="0%" stop-color="darkorange" />
<stop offset="70%" stop-color="darkorange" />
<stop offset="100%" stop-color="orange" />
</radialGradient>
<radialGradient id="ballgrad4" cx="0.5" cy="0.8" fx="0.5" fy=".........完整代码请登录后点击上方下载按钮下载查看
















网友评论0