js+css实现蓝色大气数字指针时钟显示时间代码
代码语言:html
所属分类:其他
代码描述:js+css实现蓝色大气数字指针时钟显示时间代码
代码标签: js css 蓝色 大气 数字 指针 时钟 显示 时间 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css?family=Lato:400,400i,700");
* {
transition: color .4s, background .4s, border .4s;
transition-timing-function: ease-in;
}
body {
background: #F9FBE7;
}
body.dark {
background: #242236;
}
.container {
display: flex;
height: 100vh;
}
.clock {
position: relative;
margin: auto;
width: 100px;
height: 260px;
}
.box {
color: #7986CB;
background: #EDE7F6;
font-size: 20px;
text-align: center;
font-family: Lato, sans-serif;
border: 2px solid #D1C4E9;
border-radius: 4px;
}
.dark .box {
color: #90CAF9;
background: #4527A0;
border: 2px solid #673AB7;
}
.date {
width: 120px;
padding: 5px 8px;
position: absolute;
top: -65px;
left: 45px;
}
.clock-face {
position: absolute;
height: 220px;
width: 220px;
background: #EDE7F6;
border-radius: 50%;
border: 4px solid #D1C4E9;
}
.dark .clock-face {
background: #4527A0;
border: 4px solid #673AB7;
}
.marker {
position: absolute;
width: 10px;
height: 10px;
background: #7986CB;
border-radius: 50%;
}
.dark .marker {
background: #90CAF9;
}
.twelve {
left: 105px;
top: 8px;
}
.three {
right: 8px;
top: 105px;
}
.six {
left: 105px;
bottom: 8px;
}
.nine {
left: 8px;
top: 105px;
}
.hand {
position: absolute;
left: 110px;
transform-origin: 0%;
border-radius: 0 50% 50% 0;
}
.hour-hand {
height: 8px;
width: 62px;
top: 107px;
background: #F06292;
}
.dark .hour-hand {
background: #E91E63;
}
.minute-hand {
height: 6px;
width: 88px;
top: 108px;
background: #FF8A65;
}
.dark .minute-hand {
background: #FF9800;
}
.second-hand {
height: 3px;
width: 98px;
top: 109px;
background: #777;
transition: transform 0.15s ease-out;
}
.dark .second-hand {
background: #eee
}
.centre {
position: absolute;
width: 16px;
height: 16px;
background: #777;
border-radius: 50%;
top: 102px;
left: 102px;
}
.dark .centre {
background: #eee
}
.digital-time {
width: 90px;
padding: 5px 8px;
position: absolute;
top: 250px;
left: 55px;
}
.dark .digital-time {
color: #90CAF9;
background: #4527A0;
border: 2px solid #673AB7;
}
.switch-label {
color: #7986CB;
padding-right: 6px;
line-height: 1.6em;
font-family: Lato, sans-serif;
font-size: 0.9em;
}
.dark .switch-label {
color: #90CAF9;
}
/* The switch - the box around the slider */
.switch {.........完整代码请登录后点击上方下载按钮下载查看
网友评论0