Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
Favorite time of the day?
Dusk
Day
Sunset
Night
css
body { background: radial-gradient(#870000, #53346d); font-family: "Comfortaa", sans-serif; } .main-content { max-width: 700px; margin: 4em auto 0; text-align: center; } h1 { margin: 2em 0; color: #fff; } svg { display: inline-block; } path, polygon, circle, rect { transition: fill 1s ease; } .window { position: relative; background: #fff; margin: 0 auto 2em; display: inline-block; padding: 10px; } .window:before { content: ''; position: absolute; margin: auto; left: 0; right: 0; height: 18px; top: 100%; width: 112%; margin-left: -6%; background: #f4c7c7; } .cat { position: absolute; z-index: 10; bottom: -5px; right: -35px; } .illustration { position: relative; align-self: end; margin: auto; width: 250px; overflow: hidden; } .mountain, .hill, .land, .trees, .sun, .clouds, .moon, .stars { position: absolute; left: 0; margin: auto; right: 0; } .mountain { bottom: 45px; } .hill { bottom: 45px; } .trees { bottom: 25px; } .sun { top: 120px; margin-left: -20px; transition: all 1s ease; transform: scale(0.2); } .moon, .stars { top: 25px; opacity: 0; } .land { bottom: 3px; } .clouds { top: 50px; right: -500px; transition: all 1s ease .1s; } .day .sun { top: 10px; margin-left: 0; transform: scale(1); } .day .clouds { right: 0; } .night .stars, .night .moon { opacity: 1; transition: all 1s ease .5s; } .night #sky { fill: #17377f; } .night #mountain { fill: #73addf; } .night #hill { fill: #659fcd; } .night #land { fill: #508bb5; } .night .trees { fill: #1c2c3b; } .night .trunks { fill: #3f3e3d; } .sunset .sun { top: 60px; margin-left: -80px; transform: scale(1); } .sunset #sun { fill: #fff; } .sunset #sky { fill: url(#sky_sunset); } .sunset #mountain { fill: #efbb2b; } .sunset #hill { fill: #e6ad28; } .sunset #land { fill: #de9f26; } .sunset .trees { fill: #747c0b; } .sunset .trunks { fill: #3f3e3d; } .dusk .sun { top: 60px; margin-left: 140px; transform: scale(1); } .dusk #sun { fill: #ffffda; } .dusk #sky { fill: url(#sky_dusk); } .dusk #mountain { fill: #f1a3a2; } .dusk #hill { fill: #e09c9c; } .dusk #land { fill: #c4918d; } .dusk .trees { fill: #ce791c; } .dusk .trunks { fill: #8c5f50; } .option-wrapper { display: flex; margin: 3em auto; background: rgba(255, 255, 255, 0.25); border-radius: 4px; padding: 5px; max-width: 300px; font-size: 12px; line-height: 1.2; } .option-wrapper .option { transition: all 200ms ease; padding: 10px 10px 8px; width: 50%; border-radius: 4px; cursor: pointer; color: #fff; } .option-wrapper .option.active { background: #fff; color: #333; pointer-events: none; } aside.context { text-align: center; color: #fff; } aside.context a { text-decoration: none; color: #fff; padding: 3px 0; border-bottom: 1px dashed; } aside.context .explanation { max-width: 700px; margin: 4em auto; } footer { text-align: center; margin: 8em auto; width: 100%; } footer a { text-decoration: none; display: inline-block; width: 45px; height: 45px; border-radius: 50%; background: transparent; border: 1px dashed #fff; color: #fff; margin: 5px; } footer a:hover { background: rgba(255, 255, 255, 0.1); } footer a .icons { margin-top: 12px; display: inline-block; font-size: 20px; }
JavaScript
$(".option").on("click", function() { $(".option").removeClass("active"); $(this).addClass("active"); var type = $(this).data("option"); setTimeout(function() { if (type === "day") { $(".time").attr('class', 'time day'); } else if (type === "night") { $(".time").attr('class', 'time night'); } else if (type === "dusk") { $(".time").attr('class', 'time dusk'); } else if (type === "sunset") { $(".time").attr('class', 'time sunset'); } }, 500); });
粒子
时间
文字
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号