Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
3
2
1
css
:root { --color: #40407a; --font-color: #f1c40f; --rocket-main: white; --rocket-highlight: #e74c3c; --rocket-glass: #9AECDB; --rocket-smoke: #f1f2f6; --rocket-fire: #f0932b; --rocket-fire-highlight: #f1c40f; } html, body { padding: 0; margin: 0; width: 100%; height: 100%; background: var(--color); } #frame { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; } .shadow { position: absolute; width: 50%; height: 100%; right: 0; background: rgba(100, 100, 100, 0.1); z-index: 1; } .shadow--full { width: 100%; } .rocket { position: relative; width: 55px; height: 100px; } .rocket__body { position: relative; width: 100%; height: 100%; overflow: hidden; z-index: 10; } .rocket__body__window { position: absolute; width: 22px; height: 22px; top: 30px; left: 13.5px; border-radius: 50%; background: var(--rocket-glass); z-index: 1; border: 3px solid var(--rocket-highlight); } .rocket__body__inner { position: relative; width: 55px; height: 125px; border-radius: 80%; background: var(--rocket-main); overflow: hidden; } .rocket__body__inner:before, .rocket__body__inner:after { content: ""; position: absolute; background: var(--rocket-highlight); border-radius: 50%; } .rocket__body__inner:before { width: 100%; height: 50px; top: -30px; } .rocket__body__inner:after { width: 100%; height: 10px; bottom: 22.5px; } .rocket__wing { position: absolute; background: var(--rocket-highlight); bottom: 0px; z-index: 5; } .rocket__wing--left { left: -29px; width: 44px; height: 20px; border-radius: 100% 0 0 0; transform: rotate(-50deg); } .rocket__wing--right { right: -29px; width: 44px; height: 20px; border-radius: 0 100% 0 0; transform: rotate(50deg); } .rocket__label { width: 250px; position: absolute; top: -80px; left: -80px; } .rocket__label p { position: absolute; top: 0; left: 0; font-family: 'Bowlby One SC', cursive; font-size: 80px; line-height: 80px; margin: 0; text-transform: uppercase; color: var(--font-color); transform: rotate(-25deg); } .rocket__smoke { position: absolute; width: 50px; height: 10px; bottom: 5px; opacity: 0; z-index: 15; } .rocket__smoke__inner { position: relative; margin: 30px 0 0 0; width: 100%; height: 100%; background: var(--rocket-smoke); } .rocket__smoke__inner div { position: absolute; border-radius: 50%; width: 12px; height: 12px; left: -5px; bottom: 0; box-shadow: inset -2px -3px 0 0 var(--rocket-smoke); background: #fff; z-index: 10; } .rocket__smoke__inner div:nth-child(1) { transform: scale(1.5); left: 10%; bottom: 30%; z-index: 9; } .rocket__smoke__inner div:nth-child(2) { transform: scale(2.5); left: 50%; bottom: 90%; z-index: 8; } .rocket__smoke__inner div:nth-child(3) { transform: scale(1.1); left: 84%; bottom: 4.5%; z-index: 7; } .rocket__smoke--right { right: -50px; } .rocket__smoke--left { left: -50px; transform: rotateY(180deg); } .rocket__fire { position: absolute; width: 13.75px; height: 13.75px; bottom: -15.75px; left: 20.75px; background: var(--rocket-fire); border-radius: 80% 0 55% 50%/55% 0 80% 50%; margin-top: 20px; transform: rotate(135deg); } .rocket__fire:after { content: ""; position: absolute; top: 3px; left: 1px; width: 10.3125px; height: 10.3125px; background: var(--rocket-fire-highlight); border-radius: 80% 0 55% 50%/55% 0 80% 50%; }
JavaScript
(function() { "use strict"; let tl = gsap.timeline({repeat: -1, repeatDelay: 1}), labels = document.getElementsByClassName("labels"), rocket = document.querySelectorAll(".rocket__body, .rocket__wing, .rocket__fire"), smokeL = document.querySelectorAll(".rocket__smoke--left"), smokeR = document.querySelectorAll(".rocket__smoke--right"), fire = document.getElementsByClassName("rocket__fire"); // Durations! let cdStart = 1.25, cdLeave = cdStart / 2, esDuration = 0.10, esRepeat = 15, smDuration = 1.5; // Animations! tl.addLabel("countdown") .from(labels, { duration: cdStart, scale: 0, x: "50px", y: "50px", stagger: cdStart / labels.length, }, "countdown") .to(labels, { duration: cdLeave, scale: 0, x: "20px", y: "20px", opacity: 0, stagger: cdStart / labels.length, }, "countdown+=" + cdStart / labels.length) .addLabel("engine-start") .from(rocket, { duration: esDuration, x: "+=3px", repeat: esRepeat, }, "engine-start-=.5") .from(rocket, { duration: esDuration * 20, y: "+=5px", }, "engine-start-=1") .from(smokeL, { duration: smDuration, scale: 0, opacity: 2, stagger: smDuration / smokeL.length, x: "+=45px", y: "+=30px", }, "engine-start-=.5") .from(smokeR, { duration: smDuration, scale: 0, opacity: 2, stagger: smDuration / smokeR.length, x: "-=45px", y: "+=30px", }, "engine-start-=.5") .from(fire, { duration: smDuration, scale: 0, }, "engine-start-=.5") .addLabel("lift-off") .to(rocket, { duration: 2, y: "-=100px", }, "lift-off-=1") .to(fire, { duration: .25, scale: 2, }, "lift-off-=1") .addLabel("launch") .to(rocket, { duration: 3, y: () => "-=" + (document.body.offsetHeight) + "px", ease: "power4", }, "launch-=1.5") ; })();
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>CSS火箭-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号