js模仿苹果手机秒表计时效果代码

代码语言:html

所属分类:动画

代码描述:js模仿苹果手机秒表计时效果代码

代码标签: 手机 秒表 计时 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
  background: rgb(210, 252, 243);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-weight: 100;
}

.container {
  height: 620px;
  width: 300px;
  background: white;
  position: relative;
  border-radius: 50px;
  box-shadow: 0px 2px 20px rgba(19, 19, 19, 0.2);
}

.container-upper {
  position: absolute;
  height: 5px;
  width: 70px;
  top: 40px;
  background: #111111;
  border-radius: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.container-upper:before {
  position: absolute;
  content: "";
  height: 9px;
  width: 9px;
  left: -20px;
  background: #111111;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}

.container-lower {
  position: absolute;
  height: 50px;
  width: 50px;
  bottom: 15px;
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #111111;
}

.face {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: #111111;
  height: 73%;
  width: 93%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 1.7em;
}

.screen {
  width: 100%;
  padding: 10px;
}

.timer {
  font-weight: 100;
  font-size: 2.4em;
}

.controls {
  display: flex;
  justify-content: space-between;
  margin: 50px 0px 10px 0px;
  align-items: center;
}

.controls button {.........完整代码请登录后点击上方下载按钮下载查看

网友评论0