vue+svg实现下雪中的小鸟飞行动画效果代码
代码语言:html
所属分类:动画
代码描述:vue+svg实现下雪中的小鸟飞行动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { display: flex; align-items: center; justify-content: center; position: relative; height: 100vh; background-color: slategray; } .winter-time { position: fixed; z-index: 9999999; top: 0; left: 0; height: 100vh; width: 100%; overflow: hidden; -webkit-animation: snowBackground 3s forwards; animation: snowBackground 3s forwards; } .snow { fill: #fff; } .snow-dark { fill: #95dbf9; } .snowy { width: 100%; height: 100%; } .snow-pile { top: 0; height: 100%; line-height: 0; } .snow-pile, .snow-pile::after, .snow-pile-shape { position: absolute; left: 0; width: 100%; } .snow-pile::after { content: ""; bottom: 5px; height: calc(50% + 5px); background-color: #fff; transform-origin: bottom center; transform: scaleY(0); -webkit-animation: snowUp 3s 5.5s ease-in-out forwards; animation: snowUp 3s 5.5s ease-in-out forwards; } .snow-pile-shape { bottom: -5px; -webkit-animation: snowUpBottom 3s 5.5s ease-in-out forwards; animation: snowUpBottom 3s 5.5s ease-in-out forwards; } .snow-pile-path, .snow-pile-path-dark { transform-origin: bottom center; transform: scaleY(0); -webkit-animation: snowUp 3s ease-in-out forwards; animation: snowUp 3s ease-in-out forwards; } .snow-pile-path { -webkit-animation-delay: 4.5s; animation-delay: 4.5s; } .snow-pile-path-dark { -webkit-animation-delay: 2.5s; animation-delay: 2.5s; } .snow-flake { transform-origin: 10px 0; transform: translateY(-50px); -webkit-animation-name: fallingSnow; animation-name: fallingSnow; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; } .snow-peng { position: absolute; left: 0; top: 35%; width: 100%; -webkit-animation: floatDown 1s 8s forwards; animation: floatDown 1s 8s forwards; transform: translateY(-200%); } .peng { transform: scale(0.5); -webkit-animation: sliding 5s 11.5s infinite alternate ease-out; animation: sliding 5s 11.5s .........完整代码请登录后点击上方下载按钮下载查看
网友评论0