纯css实现秒表计时器按下结束效果代码

代码语言:html

所属分类:布局界面

代码描述:纯css实现秒表计时器按下结束效果代码

代码标签: 秒表 计时器 按下 结束 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@500&display=swap");
*,
*:after,
*:before {
  box-sizing: border-box;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}
:root {
  --state: paused;
  --bg: #ead9f2;
  --digit: #e6f2d9;
  --face: #0d1306;
  --content: #666;
  --shadow: rgba(0,0,0,0.25);
  --glare: rgba(255,255,255,0.2);
  --watch-bg: #197fe6;
  --watch-bg--light: #d1e5fa;
  --watch-bg--dark: #0a335c;
  --stroke: #262626;
  --start: #b83014;
  --start-two: #eb6347;
  --restart: #b3b3b3;
  --restart-two: #e6e6e6;
}
#start:checked ~ .stopwatch__content .ms--tens,
#pause:checked ~ .stopwatch__content .ms--tens {
  --name: ms-tens;
}
#start:checked ~ .stopwatch__content .ms--singles,
#pause:checked ~ .stopwatch__content .ms--singles {
  --name: ms-singles;
}
#start:checked ~ .stopwatch__content .s--tens,
#pause:checked ~ .stopwatch__content .s--tens {
  --name: s-tens;
}
#start:checked ~ .stopwatch__content .s--singles,
#pause:checked ~ .stopwatch__content .s--singles {
  --name: s-singles;
}
#start:checked ~ .stopwatch__content .m--tens,
#pause:checked ~ .stopwatch__content .m--tens {
  --name: m-tens;
}
#start:checked ~ .stopwatch__content .m--singles,
#pause:checked ~ .stopwatch__content .m--singles {
  --name: m-singles;
}
#start:checked ~ .stopwatch__content {
  --state: running;
}
#pause:checked ~ .stopwatch__content {
  --state: paused;
}
#start:checked ~ .stopwatch__start {
  z-index: -1;
}
.stopwatch__start:active ~ .stopwatch__stop-start,
.stopwatch__pause:active ~ .stopwatch__stop-start {
  --y: 25;
}
.stopwatch__r.........完整代码请登录后点击上方下载按钮下载查看

网友评论0