Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
css
@import url("https://fonts.googleapis.com/css?family=Spartan:400,900&display=swap"); * { box-sizing: border-box; } html, body { background: #fff; height: 100%; margin: 0; padding: 0; } .wrap { align-content: center; -webkit-box-align: center; align-items: center; display: -webkit-box; display: flex; height: 100%; -webkit-box-pack: center; justify-content: center; } .panel { background-color: #fff; border-radius: 4px; box-shadow: inset -4px -4px 8px rgba(0, 0, 0, 0.25), inset 4px 4px 8px rgba(255, 255, 255, 0.5), inset 2px 2px 2px rgba(177, 177, 177, 0.25), -4px -4px 16px rgba(255, 255, 255, 0.25), 1px 1px 1px rgba(0, 0, 0, 0.1), 4px 4px 2px rgba(0, 0, 0, 0.05), 6px 6px 3px rgba(0, 0, 0, 0.05); height: 420px; position: relative; width: 270px; } .screw { align-content: center; -webkit-box-align: center; align-items: center; background-color: #fff; border: 1px solid #eee; border-radius: 100%; box-shadow: inset -3px -3px 6px rgba(0, 0, 0, 0.1), inset 0 0 2px rgba(0, 0, 0, 0.2); display: -webkit-box; display: flex; height: 24px; -webkit-box-pack: center; justify-content: center; position: absolute; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%); width: 24px; } .screw.top { top: 24px; } .screw.top .screw__slot { -webkit-transform: rotate(10deg); transform: rotate(10deg); } .screw.bottom { bottom: 24px; } .screw.bottom .screw__slot { -webkit-transform: rotate(-30deg); transform: rotate(-30deg); } .screw__slot { background-color: #eee; border-radius: 2px; box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2); height: 4px; width: calc(100% - 2px); } .switch { background-color: #fff; border-radius: 3px; border: 1px solid #ddd; box-shadow: 0 0 2px rgba(0, 0, 0, 0.75), -2px -2px 2px rgba(255, 255, 255, 0.75); cursor: pointer; position: relative; height: 100%; width: 100%; } .switch__hole { background-color: #bbb; border-radius: 6px; height: 240px; left: 50%; padding: 2px; position: absolute; top: 50%; -webkit-transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%); width: 120px; } .switch__groove { background-color: #f7f7f7; border-radius: 5px; box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2), inset -1px -1px 4px rgba(0, 0, 0, 0.2), -1px -1px 4px rgba(255, 255, 255, 0.5); padding: 5px; height: 100%; width: 100%; } .switch__top { background-color: #eee; box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.05), inset 0 0 24px rgba(0, 0, 0, 0.025), inset -16px -16px 36px rgba(0, 0, 0, 0.1); height: 50%; left: 0; position: absolute; top: 0; -webkit-transition: background .25s ease, box-shadow .25s ease; transition: background .25s ease, box-shadow .25s ease; width: 100%; z-index: 2; } .switch__top-outset { background-color: #fff; background-image: -webkit-gradient(linear, left top, right top, from(#fff), to(#f7f7f7)); background-image: linear-gradient(90deg, #fff 0%, #f7f7f7 100%); height: 10px; -webkit-transition: height .25s ease; transition: height .25s ease; } .switch__bottom { background-color: #fff; box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1), inset 0 0 12px rgba(0, 0, 0, 0.05); height: 50%; left: 0; position: absolute; top: 50%; -webkit-transition: background .25s ease, box-shadow .25s ease; transition: background .25s ease, box-shadow .25s ease; width: 100%; z-index: 2; } .switch__bottom-outset { bottom: 0; background-color: #fff; background-image: -webkit-gradient(linear, left top, right top, from(#e7e7e7), to(#d7d7d7)); background-image: linear-gradient(90deg, #e7e7e7 0%, #d7d7d7 100%); box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1), inset 0 0 12px rgba(0, 0, 0, 0.05); height: 0px; position: absolute; -webkit-transition: height .25s ease; transition: height .25s ease; width: 100%; } .switch__shadow-box { height: 208px; left: 104px; overflow: hidden; position: absolute; width: 100px; z-index: 1; } .switch__shadow-box.top { top: -96px; } .switch__shadow-box.bottom { top: 20px; } .switch__shadow { background-color: rgba(0, 0, 0, 0.53); height: 90px; position: absolute; -webkit-transition: left .25s ease, opacity .25s ease, -webkit-filter .25s ease, -webkit-transform .25s ease; transition: left .25s ease, opacity .25s ease, -webkit-filter .25s ease, -webkit-transform .25s ease; transition: left .25s ease, filter .25s ease, opacity .25s ease, transform .25s ease; transition: left .25s ease, filter .25s ease, opacity .25s ease, transform .25s ease, -webkit-filter .25s ease, -webkit-transform .25s ease; width: 90px; } .switch__shadow.top { bottom: 20px; -webkit-filter: blur(10px); filter: blur(10px); left: -70px; opacity: 1; -webkit-transform: rotate(20deg); transform: rotate(20deg); } .switch__shadow.bottom { bottom: 0; left: -90px; -webkit-filter: blur(0px); filter: blur(0px); opacity: .5; -webkit-transform: rotate(0deg); transform: rotate(0deg); } .light-switch { position: absolute; } .overlay { background-color: rgba(0, 0, 0, 0.73); height: 100vh; left: 0; pointer-events: none; position: fixed; top: 0; -webkit-transition: background-color .1s ease; transition: background-color .1s ease; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; width: 100vw; z-index: 10; } input[type=checkbox]:checked + .panel .switch__top { background-color: #fff; box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1), inset 0 0 12px rgba(0, 0, 0, 0.05); } input[type=checkbox]:checked + .panel .switch__top-outset { height: 0; } input[type=checkbox]:checked + .panel .switch__bottom { background-color: #eee; } input[type=checkbox]:checked + .panel .switch__bottom-outset { height: 10px; } input[type=checkbox]:checked + .panel .switch__shadow.top { left: -90px; -webkit-filter: blur(0px); filter: blur(0px); opacity: .5; -webkit-transform: rotate(0deg); transform: rotate(0deg); } input[type=checkbox]:checked + .panel .switch__shadow.bottom { left: -70px; -webkit-filter: blur(10px); filter: blur(10px); opacity: 1; -webkit-transform: rotate(-20deg); transform: rotate(-20deg); } input[type=checkbox]:checked + .panel .overlay { background-color: rgba(0, 0, 0, 0); }
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号