gsap实现玻璃球中下雪动画效果代码
代码语言:html
所属分类:动画
代码描述:gsap实现玻璃球中下雪动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 90vh;
background-color: hsl(210, 60%, 15%);
}
#snowball {
clip-path: circle(50%);
width: 200px;
height: 200px;
}
.snowflake-area {
width: 200px;
height: 200px;
border-radius: 50%;
border: 1px solid rgba(255, 255, 255, 0.1);
position: relative;
background: radial-gradient(
circle,
rgba(255, 255, 255, 0.05) 60%,
rgba(255, 255, 255, 0.2) 80%
);
}
/* Highlights */
.snowflake-area::before {
content: "";
filter: blur(1px);
position: absolute;
width: 50%;
height: 30%;
top: 2%;
left: 25%;
border-radius: 50%;
background-image: linear-gradient(
to bottom,
rgba(255, 255, 255, 0.15),
rgba(255, 255, 255, 0)
);
}
/* Reflections */
.snowflake-area::after {
content: "";
border-radius: 30%;
width: 200px;
height: 200px;
position: absolute;
z-index: -1;
bottom: -100px;
left: 0px;
transform: perspective(150px) rotatex(80deg);
filter: blur(20px);
background: radial-gradient(
circle,
rgba(255, 255, 255, 0.3) 10%,
hsla(210, 60%, 30%, 0.8) 25%,
rgba(255, 255, 255, 0.8) 40%
);
}
button {
margin-top: 100p.........完整代码请登录后点击上方下载按钮下载查看
网友评论0