svg实现文字跳动动画效果代码
代码语言:html
所属分类:动画
代码描述:svg实现文字跳动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap');
body {
background: #333;
height: 100vh;
display: flex;
justify-content: center;
overflow: hidden;
}
svg {
width: 30%;
animation: rotate infinite linear;
mix-blend-mode: multiply;
margin: 0 -8%;
}
svg:nth-child(1) {
fill: tomato;
animation-duration: 4s;
}
svg:nth-child(2) {
fill: gold;
animation-duration: 2s;
animation-direction: reverse;
}
svg:nth-child(3) {
fill: lime;
animation-duration: 6s;
}
svg:nth-child(4) {
fill: turquoise;
animation-duration: 3s;
animation-direction: reverse;
}
@keyframes rotate {
100%{transform: rotate(360deg)}
}
h1 {
position: absolute;
width: fit-content;
height: fit-content;
left:0;
right:0;
top:0;
bottom:0;
margin: auto;
font-family: 'Poppins', sans-serif;
text-transform: uppercase;
font-weight: 900;
color: white;
letter-spacing: .5em;
font-size: 10vw;
animation: text 1s infinite;
mix-blend-mode: screen;
}
@keyframes text {
0% {text-shadow: 5px 0px 0px tomato;}
10%{text-shadow: -5px -5px 0px gold;}
20% {text-shadow: 5px 0px 0px lime;}
30% .........完整代码请登录后点击上方下载按钮下载查看
网友评论0