Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
css
* { margin: 0; padding: 0; } body { background-color: #1f1f1f; } .container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 400px; height: 400px; border-radius: 20px; overflow: hidden; } .day, .night { position: relative; width: 100%; height: 100%; transition: 1s; } .day { background: linear-gradient(#fff3a0 20%, #ffc31e 60%, #3a8bc1, #255d82); } .wave { position: absolute; left: 50%; transform: translateX(-50%); width: 200%; height: 200%; z-index: 100; transition: 1s; } .wave1 { top: 60%; border-radius: 45%; background-color: rgba(89, 207, 247, 0.6); animation: rotating 5s linear infinite; } .wave2 { top: 68%; border-radius: 40%; background-color: rgba(37, 130, 206, 0.5); animation: rotating 8s linear infinite; } .wave3 { top: 70%; border-radius: 37%; background-color: rgba(20, 113, 188, 0.5); animation: rotating 12s linear infinite; } @keyframes rotating { 100% { transform: translateX(-50%) rotate(360deg); } } .sun { position: absolute; top: 5%; left: 20%; width: 80px; height: 80px; background-color: #ffcc3e; border-radius: 50%; box-shadow: 0 0 25px #ffcc3e; } .cloud { position: absolute; top: 20%; width: 120px; height: 40px; background-color: #fff; border-radius: 50px; animation: moving 5s linear infinite alternate-reverse; } .cloud::before { content: ""; position: absolute; top: -65%; left: 10%; width: 50px; height: 50px; background-color: #fff; border-radius: 50%; } .cloud::after { content: ""; position: absolute; top: -35%; left: 45%; width: 40px; height: 40px; background-color: #fff; border-radius: 50%; } @keyframes moving { 0% { left: 30%; } 100% { left: 50%; } } .night { background: linear-gradient(#255d82, #1d4763, #0e2230); } .container:hover .day, .container:hover .night { transform: translateY(-400px); } .moon { position: absolute; top: 5%; right: 20%; width: 80px; height: 80px; border-radius: 50%; box-shadow: inset -20px -15px 0 #fff; } .star { position: absolute; width: 4px; height: 4px; background-color: #fff; border-radius: 50%; box-shadow: 0 0 10px #fff; animation: staring 2s linear infinite; } .star1 { top: 47%; left: 100%; animation-delay: -0.1s; } .star2 { top: 28%; left: 23%; animation-delay: -0.2s; } .star3 { top: 7%; left: 14%; animation-delay: -0.3s; } .star4 { top: 50%; left: 56%; animation-delay: -0.4s; } .star5 { top: 36%; left: 82%; animation-delay: -0.5s; } .star6 { top: 29%; left: 26%; animation-delay: -0.6s; } .star7 { top: 29%; left: 10%; animation-delay: -0.7s; } .star8 { top: 25%; left: 24%; animation-delay: -0.8s; } .star9 { top: 12%; left: 55%; animation-delay: -0.9s; } .star10 { top: 32%; left: 9%; animation-delay: -1s; } .star11 { top: 41%; left: 3%; animation-delay: -1.1s; } .star12 { top: 37%; left: 97%; animation-delay: -1.2s; } .star13 { top: 10%; left: 61%; animation-delay: -1.3s; } .star14 { top: 15%; left: 24%; animation-delay: -1.4s; } .star15 { top: 8%; left: 28%; animation-delay: -1.5s; } .star16 { top: 20%; left: 59%; animation-delay: -1.6s; } .star17 { top: 37%; left: 35%; animation-delay: -1.7s; } .star18 { top: 11%; left: 82%; animation-delay: -1.8s; } .star19 { top: 19%; left: 10%; animation-delay: -1.9s; } .star20 { top: 5%; left: 55%; animation-delay: -2s; } .star21 { top: 2%; left: 26%; animation-delay: -2.1s; } .star22 { top: 28%; left: 20%; animation-delay: -2.2s; } .star23 { top: 35%; left: 29%; animation-delay: -2.3s; } .star24 { top: 48%; left: 21%; animation-delay: -2.4s; } .star25 { top: 18%; left: 67%; animation-delay: -2.5s; } .star26 { top: 31%; left: 69%; animation-delay: -2.6s; } .star27 { top: 3%; left: 55%; animation-delay: -2.7s; } .star28 { top: 37%; left: 74%; animation-delay: -2.8s; } .star29 { top: 50%; left: 38%; animation-delay: -2.9s; } .star30 { top: 17%; left: 2%; animation-delay: -3s; } .star31 { top: 2%; left: 69%; animation-delay: -3.1s; } .star32 { top: 13%; left: 28%; animation-delay: -3.2s; } .star33 { top: 23%; left: 38%; animation-delay: -3.3s; } .star34 { top: 36%; left: 17%; animation-delay: -3.4s; } .star35 { top: 33%; left: 79%; animation-delay: -3.5s; } .star36 { top: 23%; left: 96%; animation-delay: -3.6s; } .star37 { top: 27%; left: 44%; animation-delay: -3.7s; } .star38 { top: 20%; left: 70%; animation-delay: -3.8s; } .star39 { top: 9%; left: 58%; animation-delay: -3.9s; } .star40 { top: 9%; left: 4%; animation-delay: -4s; } @keyframes staring { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } .container:hover .wave1 { background-color: rgba(57, 119, 160, 0.6); } .container:hover .wave2 { background-color: rgba(29, 76, 107, 0.5); } .container:hover .wave3 { background-color: rgba(14, 50, 73, 0.5); } .fish { position: absolute; top: 85%; width: 45px; height: 30px; background-color: #b2b52b; border-radius: 50%; z-index: 100; animation: swimming 4s infinite; } .fish::before { position: absolute; content: ""; border-style: solid; border-width: 15px 0 15px 20px; border-color: transparent transparent transparent #b2b52b; } .fish .eye { position: absolute; top: 7px; right: 10px; width: 7px; height: 7px; background-color: #fff; border-radius: 50%; } @keyframes swimming { 0% { left: -100px; } 50% { left: 250px; } 100% { left: 450px; } }
JavaScript
粒子
时间
文字
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号