Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
css
body { background-color: #d6d6d3; height: 100vh; width: 100vw; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; margin: 0; } #c1, #c2 { position: absolute; top: 0; left: 0; height: 300px; width: 300px; border-radius: 50%; } #c1 { z-index: -11; } #c2 { z-index: 1000; } .container { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; position: relative; } .snowglobe { height: 300px; width: 300px; border-radius: 50%; background-color: #dadee8; border: 2px solid #cad0de; z-index: -30; } .snowglobe:before { position: absolute; content: ""; height: 280px; width: 280px; border-radius: 50%; top: 10px; left: 10px; background: #fff; } .snowglobe:after { position: absolute; content: ""; height: 280px; width: 290px; border-radius: 50%; top: 17px; background: #dadee8; } .base { position: relative; border-bottom: 50px solid #534f54; border-left: 10px solid transparent; border-right: 10px solid transparent; height: 0; width: 242px; margin-top: -60px; z-index: -10; -ms-flex-item-align: center; -ms-grid-row-align: center; align-self: center; } .base:after { position: absolute; content: ""; top: 25px; left: -10px; width: 262px; height: 50px; border-radius: 125px / 25px; background: #534f54; } .baseTop { background-color: #fff; width: 242px; height: 40px; border-radius: 125px / 20px; margin-top: -72px; box-sizing: border-box; border-bottom: 8px solid #dadee8; z-index: -10; -ms-flex-item-align: center; -ms-grid-row-align: center; align-self: center; } .baseShadow { position: absolute; background-color: #a1a6b1; width: 275px; height: 60px; border-radius: 130px / 30px; top: 270px; z-index: -40; -ms-flex-item-align: center; -ms-grid-row-align: center; align-self: center; } .tree { position: absolute; width: 0; height: 0; border-left: 20px solid transparent; border-bottom: 70px solid #8caba1; margin-top: 67px; margin-left: -80px; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .tree:after { position: absolute; content: ""; width: 0; height: 0; border-right: 20px solid transparent; border-bottom: 70px solid #7e9990; } .tree4 { position: absolute; width: 0; height: 0; border-left: 30px solid transparent; border-right: 30px solid transparent; border-bottom: 100px solid #516463; margin-top: 65px; margin-left: -50px; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .tree4:after { position: absolute; content: ""; width: 0; height: 0; border-right: 30px solid transparent; border-bottom: 100px solid #5a706e; } .tree2 { position: absolute; width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-bottom: 70px solid #5a706e; margin-top: 67px; margin-left: 70px; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .tree2:after { position: absolute; content: ""; width: 0; height: 0; border-right: 20px solid transparent; border-bottom: 70px solid #516463; } .tree3 { position: absolute; width: 0; height: 0; border-left: 20px solid transparent; border-bottom: 80px solid #7e9990; margin-top: 69px; margin-left: -20px; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .tree3:after { position: absolute; content: ""; width: 0; height: 0; border-right: 20px solid transparent; border-bottom: 80px solid #8caba1; } .roof { position: absolute; width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 31.25px solid #ba616d; margin-top: 58px; margin-left: 30px; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .cabin { position: absolute; background: #534f54; display: inline-block; height: 40px; margin-top: 93px; margin-left: 30px; width: 80px; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .cabin:before { border-bottom: 25px solid #534f54; border-left: 40px solid transparent; border-right: 40px solid transparent; content: ""; height: 0; left: 0; position: absolute; top: -25px; width: 0; }
JavaScript
(function() { var c1 = document.getElementById("c1"); var c2 = document.getElementById("c2"); var ctx1 = c1.getContext("2d"); var ctx2 = c2.getContext("2d"); c1.height = 300; c1.width = 300; c2.height = 300; c2.width = 300; ctx1.fillStyle = "white"; ctx2.fillStyle = "white"; var c1Flakes = []; var c2Flakes = []; function Flake(r) { this.x = Math.random() * 300; this.y = Math.random() * 250; this.r = r; } for (var i = 0; i <= 80; i++) { var flake = new Flake(2); c1Flakes.push(flake); } for (var i = 0; i <= 80; i++) { var flake = new Flake(3); c2Flakes.push(flake); } function render() { ctx1.clearRect(0, 0, 300, 300); ctx2.clearRect(0, 0, 300, 300); for (var i = 0; i < c1Flakes.length; i++) { ctx1.beginPath(); ctx1.arc(c1Flakes[i].x, c1Flakes[i].y, c1Flakes[i].r, 0, Math.PI * 2); ctx1.fill(); if (c1Flakes[i].y <= 245){ c1Flakes[i].y+= .3; } else{ c1Flakes[i].y = 0; } } for (var i = 0; i < c2Flakes.length; i++) { ctx2.beginPath(); ctx2.arc(c2Flakes[i].x, c2Flakes[i].y, c2Flakes[i].r, 0, Math.PI * 2); ctx2.fill(); if (c2Flakes[i].y <= 245){ c2Flakes[i].y += .6; } else{ c2Flakes[i].y = 0; } } requestAnimationFrame(render); } render(); })();
粒子
时间
文字
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号