Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
css
* { box-sizing: border-box; } html { height: 100%; } body { height: 100%; background: linear-gradient(#ffad00 50%, #d58500); background-repeat: no-repeat; background-attachment: fixed; display: flex; justify-content: center; align-items: center; } form { width: 600px; height: 350px; margin: -4px -2px; border-radius: 500px; background: linear-gradient(#ffbd00, #ca7900); box-shadow: 0 1px 5px hsla(41, 100%, 40%, 0.3), -3px 25px 25px hsla(41, 100%, 35%, 0.5), -6px 50px 50px hsla(41, 100%, 30%, 0.3), -9px 65px 65px hsla(41, 100%, 20%, 0.3); } .toggle { display: flex; justify-content: center; align-items: center; width: 600px; height: 350px; background: #ffad00; border-radius: 500px; border: solid 5px transparent; background-clip: padding-box; cursor: pointer; } .toggle__wrapper { width: 500px; height: 250px; margin: -4px -2px; border-radius: 500px; background: linear-gradient(hsla(39, 100%, 44%, 1), hsla(39, 100%, 42%, 0.1)); box-shadow: 0px 5px 1px 0 hsla(41, 100%, 57%, 0.7); } .toggle__bg { width: 500px; height: 250px; background: hsla(199, 43%, 59%, 1); background: linear-gradient(to right, hsla(199, 43%, 59%, 1) 50%, hsla(18, 77%, 50%, 1) 50% 100%); background-size: 200% 100%; background-position: 75%; border-radius: 500px; border: solid 5px transparent; background-clip: padding-box; box-shadow: inset 0px 30px 50px 15px hsla(0, 0%, 0%, 0.30); transition: all 0.85s ease-in-out; } .toggle__sphere { position: relative; height: 238px; width: 238px; background: hsla(18, 100%, 62%, 1); background: linear-gradient(to right, hsla(199, 43%, 59%, 1) 50%, hsla(18, 77%, 50%, 1) 50% 100%); border-radius: 50%; transform-origin: top left; transform: translateY(1px); box-shadow: 2px 0px 5px 1px hsla(18, 77%, 15%, 0.05), 0px 10px 10px 1px hsla(18, 77%, 15%, 0.2), -3px 0px 3px 1px hsla(0, 0%, 0%, 0.75); transition: all 0.85s ease-in-out; } .toggle__sphere:before, .toggle__sphere:after { content: ''; position: absolute; left: calc(50% - 20px); height: 1px; width: 40px; background: hsla(0, 0%, 0%, 0.25); border-radius: 50%; box-shadow: 0px 0px 10px 0px hsla(0, 0%, 0%, 0.25); } .toggle__sphere:before { top: -2px; } .toggle__sphere:after { bottom: -1px; } .toggle__sphere-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; border-radius: 50%; box-shadow: inset 0px -30px 30px 15px hsla(0, 0%, 0%, 0.1) } .toggle__sphere-bg { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; border-radius: 50%; transition: transform 0.85s ease-in-out; } .toggle__sphere-bg:before, .toggle__sphere-bg:after { content: ''; position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; } .toggle__sphere-bg:before { background-color: hsla(18, 77%, 50%, 1); border-radius: 50%; } .toggle__sphere-bg:after { background-color: hsla(199, 43%, 59%, 1); transform: rotateY(180deg); border-radius: 50%; } input { opacity: 0; width: 0; height: 0; position: absolute; } input:checked + .toggle__bg { background-position: 25%; } input:checked + .toggle__bg .toggle__sphere { transform: translateX(250px) translateY(1px); box-shadow: -2px 0px 5px 1px hsla(18, 77%, 15%, 0.05), 0px 10px 10px 1px hsla(18, 77%, 15%, 0.2), 3px 0px 3px 0px hsla(0, 0%, 0%, 0.75); } input:checked + .toggle__bg .toggle__sphere-bg { transform: rotateY(180deg); }
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号