div+css实现炫酷精致checkbox质感滑块开关效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css实现炫酷精致checkbox质感滑块开关效果代码
代码标签: div css 炫酷 精致 checkbox 质感 滑块 开关
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> /*** IN PROGRESS ***/ :root { --sz: 10vmin; --on: #99dc39; --of: #F44336; --lg: var(--of); --sp: 1s; } *, *:before, *:after { box-sizing: border-box; transition: all var(--sp) ease 0s; } body { margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; transition: none; background: linear-gradient(135deg, #1f1f23, #2d2d31, #101012); background: linear-gradient(135deg, #161618, #212125, #060606); } body:before, body:after { content: ""; position: absolute; width: 100%; height: 100%; background: repeating-conic-gradient(#0002 0.000095%, #fff0 .0005%, #fff0 .005%, #fff0 .0005%), repeating-conic-gradient(#0002 0.00001%, #fff0 .00009%, #fff0 .00075%, #fff0 .000025%); opacity: 0.75; filter: blur(0.75px); } .content { position: relative; width: calc(var(--sz) * 5.55); height: calc(var(--sz) * 2); display: flex; align-items: center; justify-content: center; } input { display: none; } label[for=btn] { position: absolute; width: calc(var(--sz) * 5.55); height: calc(var(--sz) * 2); background: linear-gradient(0deg, #12172080, #0d121780); border-radius: var(--sz); display: flex; ali.........完整代码请登录后点击上方下载按钮下载查看
网友评论0