gsap+svg+MorphSVGPlugin3实现输入字符串移除重复字符串动画效果代码
代码语言:html
所属分类:动画
代码描述:gsap+svg+MorphSVGPlugin3实现输入字符串移除重复字符串动画效果代码
代码标签: gsap svg MorphSVGPlugin3 移除 重复 字符串 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Sniglet:wght@400;800&display=swap'>
<style>
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
font-family: "Sniglet", cursive;
width: 100vw;
height: 100vh;
display: grid;
place-items: center;
overflow: hidden;
background: radial-gradient(circle, #af4a4c, #a44547);
}
svg {
width: 3rem;
position: absolute;
transform-origin: center 75%;
transform: scale(0);
}
input {
position: absolute;
width: 100vw;
height: 100vh;
z-index: 10;
opacity: 0;
}
label {
color: white;
font-size: 2rem;
position: absolute;
}
label span {
color: transparent;
position: relative;
}
label span:before {
content: ".";
position: absolute;
bottom: 0;
color: white;
margin-left: 1px;
-webkit-animation: load 2s linear infinite;
animation: load 2s linear infinite;
display: inline-block;
}
output {
position: relative;
width: 100vw;
height: auto;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
padding: 0 4rem;
}
output > span {
position: relative;
font-size: 4rem;
color: transparent;
font-weight: 800;
min-width: 1rem;
margin: 1px;
text-align: center;
line-height: 1.3;
-webkit-animation: enter 0.3s cubic-bezier(0.175, 0.885, 0.3, 1.2);
animation: enter 0.3s cubic-bezier(0.175, 0.885, 0.3, 1.2);
}
output > span .ani-wrap {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0