css实现checkbox质感美化开关效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现checkbox质感美化开关效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { min-height: 100vh; display: flex; justify-content: center; align-items: center; background: #000; } * { box-sizing: border-box; } input[type=checkbox] { -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer; } input[type=checkbox]:focus { outline: 0; } .toggle { height: 28px; width: 52px; border-radius: 14px; display: inline-block; position: relative; margin: 0; background: linear-gradient(90deg, #3B3B35 0%, #4F4F4A 20%, #4E5049 50%, #4F4F4A 70%, #3B3B35 100%); box-shadow: inset 0px 0px 0px 1px rgba(255, 255, 255, 0.07), inset 0px 2px 4px rgba(0, 0, 0, 0.35); transi.........完整代码请登录后点击上方下载按钮下载查看
网友评论0