css美化checkbox开关实现日夜切换代码

代码语言:html

所属分类:表单美化

代码描述:css美化checkbox开关实现日夜切换代码单悬停动画效果代码

代码标签: css 美化 checkbox 开关 实现 日夜 切换 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
  
<style>
body {
  display: grid;
  place-items: center;
  margin: 0;
  min-height: 100vh;
  font-size: 15vmin;
/*   background: #004; */
  transition: background 0.4s;
}

body:has(:checked) {
/*   background: #ffa94c; */
}

@property --x {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 35%;
}

@property --c1 {
  syntax: '<color>';
  inherits: true;
  initial-value: #00002e;
}

@property --c2 {
  syntax: '<color>';
  inherits: true;
  initial-value: #593d92;
}

@property --c3 {
  syntax: '<color>';
  inherits: true;
  initial-value: #ddf;
}

@property --c4 {
  syntax: '<color>';
  inherits: true;
  initial-value: #593d92;
}

@property --x1 {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

@property --x2 {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

@property --x3 {
  syntax: '<length>';
  inherits: true;
  in.........完整代码请登录后点击上方下载按钮下载查看

网友评论0