vue火箭升空动画效果
代码语言:html
所属分类:动画
代码描述:vue火箭升空动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css?family=Cute+Font&display=swap"); html, body { width: 100%; height: 100%; margin: 0; } body { background: #333; color: #fff; font-family: "Cute Font", cursive; } #app { width: 100%; height: 100%; padding: 30px; box-sizing: border-box; } * { -webkit-transition: 0.8s; transition: 0.8s; } *:before, *:after { content: ""; position: absolute; } .wrapper { position: relative; width: 100%; height: 100%; } .rocket { position: absolute; top: calc(50% - 150px); left: calc(50% - 35px); width: 70px; height: 110px; -webkit-transform-origin: top center; transform-origin: top center; -webkit-animation: 1s alternate infinite rocket; animation: 1s alternate infinite rocket; } .rocket__body { position: absolute; top: 0; left: 10px; width: 50px; height: 100px; overflow: hidden; border-radius: 90% 90% 0 0; z-index: 10; } .rocket__inner { width: 50px; height: 115px; border-radius: 90%; background: #fff; overflow: hidden; } .rocket__inner:before { top: 35px; left: 14px; width: 20px; height: 20px; border-radius: 50%; border: 3px solid #aaa; background: #71b2ce; box-sizing: border-box; } .rocket__inner:after { top: -5px; left: 10px; width: 30px; height: 25px; border-radius: 50%; background: #f05e5e; } .rocket__wing { position: absolute; top: 70px; background: #f05e5e; width: 45px; height: 20px; } .rocket__wing--right { right: -10px; -webkit-transform: rotate(45deg); transform: rotate(45deg); border-radius: 0 90% 0 0; } .rocket__wing--left { left: -10px; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); border-radius: 90% 0 0 0; } .rocket__wing--center { top: 70px; left: 28px; width: 12px; height: 40px; border-radius: 50%; z-index: 10; } .rocket__fire { position: absolute; top: 122px; left: 15px; background: #f05e5e; width: 40px; height: 40px; border-radius: 90% 0 90% 90%; -webkit-transform: scale(0.6) translateY(10px) rotate(-45deg); transform: scale(0.6) translateY(10px) rotate(-45deg); } .rocket__fire:before { top: 7px; left: 14px; background: orange; width: 20px; height: 20px; border-radius: 90% 0 90% 90%; z-index: 10; -webkit-animation: 1s alternate infinite fire2; animation: 1s alternate infinite fire2; } .rocket__fire:after { top: -2px; left: -4px; width: 44px; height: 48px; border-radius: 50%; background: #f05e5e; -webkit-transform: rotate(45deg); transform: rotate(45deg); -webkit-animation: 1s alternate infinite fire; animation: 1s alternate infinite fire; } .charge-box { position: absolute; bottom: 10px; left: calc(50% - 102px); display: -webkit-box; display: flex; -webkit-box-pack: center; justify-content: center; -webkit-box-orient: vertical; -webkit-box-direction: normal; flex-flow: column; -webkit-box-align: center; align-items: center.........完整代码请登录后点击上方下载按钮下载查看
网友评论0