圣诞节快乐文字描边绘画动画效果代码
代码语言:html
所属分类:动画
代码描述:圣诞节快乐文字描边绘画动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url(https://fonts.googleapis.com/css?family=Calligraffitti);
@-webkit-keyframes s {
0% {
stroke-dasharray: 0 300;
}
100% {
stroke-dasharray: 300 0;
}
}
@keyframes s {
0% {
stroke-dasharray: 0 300;
}
100% {
stroke-dasharray: 300 0;
}
}
@-webkit-keyframes f {
0% {
transform: translateY(-40px);
opacity: 0.5;
}
50% {
transform: scale(1.5);
opacity: 0.1;
}
100% {
transform: translateY(50vh);
opacity: 0;
}
}
@keyframes f {
0% {
transform: translateY(-40px);
opacity: 0.5;
}
50% {
transform: scale(1.5);
opacity: 0.1;
}
100% {
transform: translateY(50vh);
opacity: 0;
}
}
html {
height: 100%;
}
body {
background: #a32300;
font-family: "Calligraffitti";
height: 100%;
text-align: center;
}
svg {
margin-top: calc(50vh - 75px);
width: 300px;
}
.Merry, .Christmas {
fill: none;
stroke: #fff;
text-shadow: 0 0 14px #a32300;
stroke-width: 4;
stroke-dasharray: 0 100;
text-anchor: middle;
}
.Merry {
font-size: 44px;
}
.Merry tspan:nth-child(1) {
-webkit-animation: s 2s 1s linear forwards;
animation: s 2s 1s linear forwards;
}
.Merry tspan:nth-child(2) {
-webkit-animation: s 2s 2s linear forwards;
animation: s 2s 2s linear forwards;
}
.Merry tspan:nth-child(3) {
-webkit-animation: s 2s 3s linear forwards;
animation: s 2s 3s linear forwards;
}
.Merry tspan:nth-child(4) {
-webkit-animation: s 2s 4s linear forwards;
animation: s 2s 4s linear forwards;
}
.Merry tspan:nth-child(5) {
-webkit-animation: s 2s 5s linear forwards;
animation: s 2s 5s linear forwards;
}
.Christmas {
font-size: 64px;
stroke-width: 6;
}
.Christmas tspan:nth-child(1) {
-webkit-animation: s 2s 6s linear forwards;
animation: s 2s 6s linear forwards;
}
.Christmas tspan:nth-child(2) {
-webkit-animation: s 2s 7s linear forwards;
animation: s 2s 7s linear forwards;
}
.Christmas tspan:nth-child(3) {
-webkit-animation: s 2s 8s linear forwards;
animation: s 2s 8s linear forwards;
}
.Christmas tspan:nth-child(4) {
-webkit-animation: s 2s 9s linear forwards;
animation: s 2s 9s linear forwards;
}
.Christmas tspan:nth-child(5) {
-webkit-animation: s 2s 10s linear forwards;
animation: s 2s 10s linear forwards;
}
.Christmas tspan:nth-child(6) {
-webkit-animation: s 2s 11s linear forwards;
animation: s 2s 11s linear forwards;
}
.Christmas tspan:nth-child(7) {
-webkit-animation: s 2s 12s linear forwards;
animation: s 2s 12s linear forwards;
}
.Christmas tspan:nth-child(8) {
-webkit-animation: s 2s 13s linear forwards;
animation: s 2s 13s linear forwards;
}
.Christmas tspan:nth-child(9) {
-webkit-animation: s 2s 14s linear forwards;
animation: s 2s 14s linear forwards;
}
.Snow {
position: absolute;
filter: blur(1px);
top: 0;
left: 0;
width: 100%;
font-size: 0;
height: 100%;
overflow: hidden;
}
.Snow-flake {
-webkit-animation: f 4s linear infinite;
animation: f 4s linear infinite;
display: inline-block;
border-radius: 50%;
background: #fff;
margin: 0 10px 0;
width: 10px;
height: 10px;
transform: translateY(-40px);
opacity: 0.5;
}
.Snow-flake:nth-child(1) {
-webkit-animation-delay: -3.6793681361s;
animation-delay: -3.6793681361s;
}
.Snow-flake:nth-child(2) {
-webkit-animation-delay: -0.4661163393s;
animation-delay: -0.4661163393s;
}
.Snow-flake:nth-child(3) {
-webkit-animation-delay: -3.4905253225s;
animation-delay: -3.4905253225s;
}
.Snow-flake:nth-child(4) {
-webkit-animation-delay: -2.7553831417s;
animation-delay: -2.7553831417s;
}
.Snow-flake:nth-child(5) {
-webkit-animation-delay: -0.7750134007s;
animation-delay: -0.7750134007s;
}
.Snow-flake:nth-child(6) {
-webkit-animation-delay: -2.5446368156s;
animation-delay: -2.5446368156s;
}
.Snow-flake:nth-child(7) {
-webkit-animation-delay: -1.5677614822s;
animation-delay: -1.5677614822s;
}
.Snow-flake:nth-child(8) {
-webkit-animation-delay: -2.3025289221s;
animation-delay: -2.3025289221s;
}
.Snow-flake:nth-child(9) {
-webkit-animation-delay: -2.2273608114s;
animation-delay: -2.2273608114s;
}
.Snow-flake:nth-child(10) {
-webkit-animation-delay: -2.8704051936s;
animation-delay: -2.8704051936s;
}
.Snow-flake:nth-child(11) {
-webkit-animation-dela.........完整代码请登录后点击上方下载按钮下载查看
网友评论0