Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
x
this one fades
x
this one gets swiped
x
this one spins
x
and so does this one
x
this one breaks in two
x
this one breaks apart
x
this one falls
css
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap'); body{background-color: #1F1F1F;} .container { overflow: hidden; min-height: 200vh; } .pop-up { height: 100px; width: 50%; border-radius: 10px; margin: 5px auto; position: relative; } .pop-up div { color: white; line-height: 100px; padding-left: 10%; font-family: 'Roboto', sans-serif; } .close { background: transparent; border: none; position: absolute; right: 5px; color: white; font-size: 25px; cursor: pointer; outline: none; } #one { background: salmon; } #two { background: orange; } #three { background: skyblue; } #four { background: #405CBF; } #five { background: blue; position: relative; } #five:before { content: ""; display: none; background: blue; height: 100px; width: 50%; position: absolute; border-radius: 10px 0px 0px 10px; } #five:after { content: ""; display: none; background: blue; height: 100px; width: 50%; position: absolute; left: 50%; border-radius: 0px 10px 10px 0px; } #six { background: darkblue; position: relative; } #six span { background: darkblue; height: 100px; width: 10%; border-radius: 0%; top: 0; position: absolute; } #last { background: #030B4D; }
JavaScript
let one = document.querySelector(".one"); let two = document.querySelector(".two"); let three = document.querySelector(".three"); let four = document.querySelector(".four"); let five = document.querySelector(".five"); let six = document.querySelector(".six"); let last = document.querySelector(".last"); one.onclick = function () { let tl = gsap.timeline(); tl.to("#one", 1, { opacity: 0 }); tl.to("#one", 0.75, { height: 0 }); }; two.onclick = function () { let tl = gsap.timeline(); tl.to("#two", 1, { x: 900 }); tl.to("#two", 0.75, { height: 0 }); }; three.onclick = function () { let tl = gsap.timeline(); tl.to("#three", 2, { rotateY: 100 }); tl.to("#three", 1, { rotateY: 80 }); tl.to("#three", 1, { rotateY: 90 }); tl.to("#three", 0.75, { height: 0 }); }; four.onclick = function () { let tl = gsap.timeline(); tl.to("#four", 1, { rotateX: 100 }); tl.to("#four", 0.5, { rotateX: 80 }); tl.to("#four", 0.5, { rotateX: 90 }); tl.to("#four", 0.75, { height: 0 }); }; five.onclick = function () { let b = CSSRulePlugin.getRule("#five:before"); let a = CSSRulePlugin.getRule("#five:after"); let tl = gsap.timeline(); tl.set("#five", { background: "white" }); tl.set(b, { display: "inline-block", transformOrigin: "right" }); tl.set(a, { display: "inline-block", transformOrigin: "left" }); tl.to(b, 1, { cssRule: { x: -500 } }, 0); tl.to(a, 1, { cssRule: { x: 500 } }, 0); tl.to("#five", 0.75, {height: 0}); }; six.onclick = function () { let tl = gsap.timeline(); let parent = document.getElementById("six"); tl.set("#six", {background: "white"}); for (let i = 0; i < 10; i++) { let span = document.createElement("span"); span.classList.add("squares") parent.append(span); span.style.left = i * 10 + "%"; tl.to(span, 0.75, { background: "white", rotateZ: -45 }, i * 0.3); } tl.to("#six", 0.75, {height: 0}, "+=1"); } last.onclick = function () { let tl = gsap.timeline(); tl.set("#last", { transformOrigin: "left" }); tl.to("#last", 1, { rotateZ: 100 }); tl.to("#last", 1, { rotateZ: 80 }); tl.to("#last", 1, { rotateZ: 90 }); tl.to("#last", 1, { y: 500 }); tl.addLabel("fall", "<"); tl.to("#last", 1, { background: "white" }, "fall"); };
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>关闭动画-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号