gsap实现波纹放大成像动画效果代码
代码语言:html
所属分类:动画
代码描述:gsap实现波纹放大成像动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
/* hsl(62, 100%, 50%); */
/* hsl(159, 65%, 53%); */
:root {
--background-color: #161426;
--fill-color: #252140;
--stroke-color: none;
--hue-1: 210;
--sat-1: 80;
--hue-2: 240;
--sat-2: 100;
}
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
height: 100vh;
background-color: var(--background-color);
display: flex;
justify-content: center;
flex-direction: column;
}
svg {
width: 90vw;
max-width: 620px;
margin: 0 auto;
overflow: visible;
}
rect {
fill: var(--fill-color);
stroke: var(--stroke-color);
stroke-width: 2;
opacity: 0;
}
button {
cursor: pointer;
-webkit-appearance: none;
transition: all 0.3s ease;
border: none;
background: hsl(100, 0%, 20%);
color: hsl(100, 0%, 78%);
width: auto;
margin: 48px auto 0;
padding: 8px 16px;
font-size: 1rem;
font-family: "Helvetica Neue", "Helvetica", "Roboto", "Segoe UI", "Arial", sans-serif;
text-transform: uppercase;
letter-spacing: 1px;
outline: none;
}
button:disabled {
opacity: 0.5;
}
button:hover:not(:disabled) {
background: hsl(100, 0%, 26%);
}
</style>
</head>
<body >
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400">
<rect x="0" y="0" width="18" height="18"></rect>
<rect x="0" y="22" width="18" height="18"></rect>
<rect x="0" y="44" width="18" height="18"></rect>
<rect x="0" y="66" width="18" height="18"></rect>
<rect x="0" y="88" width="18" height="18"></rect>
<rect x="0" y="110" width="18" height="18"></rect>
<rect x="0" y="132" width="18" height="18"></rect>
<rect x="0" y="154" width="18" height="18"></rect>
<rect x="0" y="176" width="18" height="18"></rect>
<rect x="0" y="198" width="18" height="18"></rect>
<rect x="0" y="220" width="18" height="18"></rect>
<rect x="0" y="242" width="18" height="18"></rect>
<rect x="0" y="264" width="18" height="18"></rect>
<rect x="0" y="286" width="18" height="18"></rect>
<rect x="0" y="308" width="18" height="18"></rect>
<rect x="0" y="330" width="18" height="18"></rect>
<rect x="0" y="352" width="18" height="18"></rect>
<rect x="0" y="374" width="18" height="18"></rect>
<rect x="0" y="396" width="18" height="18"></rect>
<rect x="22" y="0" width="18" height="18"></rect>
<rect x="22" y="22" width="18" height="18"></rect>
<rect x="22" y="44" width="18" height="18"></rect>
<rect x="22" y="66" width="18" height="18"></rect>
<rect x="22" y="88" width="18" height="18"></rect>
<rect x="22" y="110" width="18" height="18"></rect>
<rect x="22" y="132" width="18" height="18"></rect>
<rect x="22" y="154" width="18" height="18"></rect>
<rect x="22" y="176" width="18" height="18"></rect>
<rect x="22" y="198" width="18" height="18"></rect>
<rect x="22" y="220" width="18" height="18"></rect>
<rect x="22" y="242" width="18" height="18"></rect>
<rect x="22" y="264" width="18" height="18"></rect>
<rect x="22" y="286" width="18" height="18"></rect>
<rect x="22" y="308" width="18" height="18"></rect>
<rect x="22" y="330" width="18" height="18"></rect>
<rect x="22" y="352" width="18" height="18"></rect>
<rect x="22" y="374" width="18" height="18"></rect>
<rect x="22" y="396" width="18" height="18"></rect>
<rect x="44" y="0" width="18" height="18"></rect>
<rect x="44" y="22" width="18" height="18"></rect>
<rect x="44" y="44" width="18" height="18"></rect>
<rect x="44" y="66" width="18" height="18"></rect>
<rect x="44" y="88" width="18" height="18"></rect>
<rect x="44" y="110" width="18" height="18"></rect>
<rect x="44" y="132" width="18" height="18"></rect>
<rect x="44" y="154" width="18" height="18"></rect>
<rect x="44" y="176" width="18" height="18"></rect>
<rect x="44" y="198" width="18" height="18"></rect>
<rect x="44" y="220" width="18" height="18"></rect>
<rect x="44" y="242" width="18" height="18"></rect>
<rect x="44" y="264" width="18" height="18"></rect>
<rect x="44" y="286" width="18" height="18"></rect>
<rect x="44" y="308" width="18" height="18"></rect>
<rect x="44" y="330" width="18" height="18"></rect>
<rect x="44" y="352" width="18" height.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0