css实现简单的checkbox开关效果代码
代码语言:html
所属分类:表单美化
代码描述:css实现简单的checkbox开关效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> /* insipration this dribble: https://dribbble.com/shots/5041745-Switcher , mine only rotates switch one way as i'm using CSS only */ /* no margin so the background is shown full page */ html, body { margin: 0 auto; } body { display: flex; justify-content: center; align-items: center; height: 100vh; } /* a background used instead of body to change background color */ .background { position: absolute; width: 100vw; height: 100vh; background: #cccccc; z-index: -1; transition: all 0.5s; } input[type=checkbox] .........完整代码请登录后点击上方下载按钮下载查看
网友评论0