css实现富士山日出动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现富士山日出动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
*, *::before, *::after {
box-sizing: border-box;
}
:root {
--easing: ease-in-out;
--duration: 5s;
}
body {
width: 100%;
height: 100vh;
margin: 0;
display: flex;
overflow: hidden;
}
.canvas {
width: 100%;
height: 100%;
display: flex;
flex-flow: column-reverse;
align-items: stretch;
background: linear-gradient(#00364f 25%, #0070A8, #71b8d7);
background-size: 100% 400%;
background-position: 0 100%;
animation: brightSky var(--duration) var(--easing);
}
.water {
height: 10%;
background: #00488d;
z-index: 1;
animation: brightPatch var(--duration) var(--easing);
}
.nonWater {
height: 40%;
display: flex;
justify-content: center;
align-items: flex-end;
}
.darkColor {
background: #265D88;
}
.lighterColor {
background: white;
}
.mountain {
height: 100%;
aspect-ratio: 3.5/1;
clip-path: polygon(7% 94%, 14% 84%, 20% 72%, 30% 50%, 34.8% 38%, 40.5% 20%, 44.5% 3%, 45% 2%, 49% 2.5%, 52% 2%, 55% 0%, 55.3% 0.5%, 58.2% 15%, 62% 30%, 65% 39.5%, 70% 53%, 75% 63%, 82% 75%, 90% 88%,100% 100%, 0% 100%);
position: relative;
transform-origin: 50% 100%;
transform: scaleX(1.1);
animation: brightPatch var(--duration) ease;
}
.patch0 {
width: 100%;
aspect-ratio: 3.6/1;
border-radius: 50%;
position: absolute;
/* transform: rotate(-40deg); */
top: -42%;
/* left: 16%; */
}
.patch1 {
width: 59%;
aspect-ratio: 5/1;
border-radius: 50%;
position: absolute;
transform: rotate(-40deg);
top: -15.6%;
left: 12%;
}
.patch2 {
widt.........完整代码请登录后点击上方下载按钮下载查看
网友评论0