TweenMax+svg实现字母文字爆炸碎片动画效果代码
代码语言:html
所属分类:动画
代码描述:TweenMax+svg实现字母文字爆炸碎片动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
background: #FED75A;
overflow: hidden;
}
figure {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
}
svg {
padding: 5vw;
width: 90vw;
}
svg > * {
fill: #1C1C1C;
stroke: #1C1C1C;
stroke-width: 0.85px;
}
/* hover tip */
body:hover:after {
content: "Hover to Slow Motion";
position: absolute;
left: 0;
right: 0;
bottom: 1vh;
color: #1C1C1C;
text-align: center;
text-transform: uppercase;
letter-spacing: 0.5px;
font: 700 9px/14px Tahoma, sans-serif;
-moz-animation: tip 2.5s forwards;
-webkit-animation: tip 2.5s forwards;
animation: tip 2.5s forwards;
}
@-moz-keyframes tip {
0%, 100% {
opacity: 0;
}
10%, 80% {
opacity: 1;
}
}
@-webkit-keyframes tip {
0%, 100% {
opacity: 0;
}
10%, 80% {
opacity: 1;
}
}
@keyframes tip {
0%, 100% {
opacity: 0;
}
10%, 80% {
opacity: 1;
}
}
</style>
</head>
<body >
<figure>
<svg x="0px" y="0px" viewBox="0 0 883 105.2" xml:space="preserve" overflow="visible">
<polygon points="359.9,49.6 359.8,49.7 359.9,49.8 "/>
<polygon points="28,0 10.8,0 28,9 "/>
<polygon points="28,12.6 0,46 0,51.9 28,48.9 "/>
<polygon points="0.8,105 28,105 28,74.7 20.3,69.7 "/>
<polygon points="28,9 10.8,0 0,0 0,46 28,12.6 "/>
<polygon points="0,51.9 0,57.3 20,69.8 20,69.8 20,69.8 28,74.7 28,48.9 "/>
<polygon points="0,57.3 0,105.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0