svg实现一个鲸鱼海鸟动画效果代码
代码语言:html
所属分类:动画
代码描述:svg实现一个鲸鱼海鸟动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html>
<head>
<style>
body, html {
height: 100%;
margin: 0;
background-color: #1f6bdc;
background-image: radial-gradient(#2a7fff,#003b94);
}
svg {
max-height: 100%;
}
#Donut {
transform-origin: 1054.33px 1055.80px;
animation-name: scale-float;
animation-duration: 6s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
}
#Whale {
transform-origin: 1054.33px 1055.80px;
animation-name: swim;
animation-duration: 30s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
#Birds {
transform-origin: 1368.75px 1379.027px;
animation-name: flying;
animation-duration: 10s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
#Ripple-01, #Ripple-02, #Ripple-03 {
transform-origin: 1054.33px 1055.80px;
animation-name: ripple-scale;
animation-duration: 6s;
animation-timing-function: ease-out;
animation-iteration-count: infinite;
}
#Ripple-02 {
animation-delay: 2s;
}
#Ripple-03 {
animation-delay: 4s;
}
@keyframes ripple-scale {
0% {
transform: scale(1);
opacity: 1;
}
100% {
transform: scale(3.2);
opacity: 0;
}
}
@keyframes scale-float {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
@keyframes swim {
0% {
tramsform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes flying {
0% {
transform: translate(0px, 0px);
opacity: 0;
}
25% {
transform: translate(-250px, -300px);
opacity: 1;
}
50% {
transform: translate(-500px, -600px);
opacity: 0;
}
100% {
transform: translate(0px, 0px);
opacity: 0;
}
}
</style>
</head>
<body>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 2100 2100" style="enable-background:new 0 0 2100 2100;" xml:space="preserve">
<style type="text/css">
.st0 {
fill: none;
stroke: #6EE4FF;
stroke-width: 8.3698;
stroke-miterlimit: 10;
}
.st1 {
fill: none;
stroke: #CFF6FF;
stroke-width: 8.0878;
stroke-miterlimit: 10;
}
.st2 {
fill: url(#SVGID_1_);
}
.st3 {
fill: #6EE4FF;
}
.st4 {
fill: url(#SVGID_2_);
}
.st5 {
opacity: 0.5;
}
.st6 {
fill: #C0FFFF;
}
.st7 {
fill: #6EECFF;
}
.st8 {
opacity: 0.502;
fill: #FFFFFF;
}
.st9 {
fill: #FFFFFF;
}
.st10 {
fill: none;
stroke: #FFFFFF;
stroke-width: 7.9628;
stroke-miterlimit: 10;
}
.st11 {
fill: none;
stroke: #FFFFFF;
stroke-width: 6.6357;
stroke-linecap: round;
stroke-linejoin: round;
stroke-miterlimi.........完整代码请登录后点击上方下载按钮下载查看
网友评论0